0

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
  • 47,739
  • 25
  • 124
  • 164
Adam Lee
  • 23,314
  • 47
  • 144
  • 221
  • 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
  • 47,739
  • 25
  • 124
  • 164