-1

for a c++ project, I can use

aux_source_directory to add all the cpp files; however this command does not include header files; anyway to add header files?

herohuyongtao
  • 49,413
  • 29
  • 133
  • 174
Adam Lee
  • 24,710
  • 51
  • 156
  • 236
  • possible duplicate of [How to properly add include directories with CMake?](http://stackoverflow.com/questions/13703647/how-to-properly-add-include-directories-with-cmake) – NaCl Apr 05 '15 at 15:03

1 Answers1

2

You can use the file command to add all the files that you want, like

file(GLOB SOURCES
    your-folder/*.hxx
    your-folder/*.cxx
)
add_executable(yourProj ${SOURCES})
herohuyongtao
  • 49,413
  • 29
  • 133
  • 174