I have a folder full of source files (*.h, *.cpp), that I want to include in a new project. However, the folder also contains two files (main.cpp, CMakeLists.txt) that I don't want to include in the new project (for obvious reasons).
I know that the commands:
aux_source_directory(. SRC_LIST)
add_executable(${PROJECT_NAME} ${SRC_LIST})
add all the source files in the project directory to the project. Also I could say:
aux_source_directory(/path/to/folder/ SRC_LIST)
add_executable(${PROJECT_NAME} ${SRC_LIST})
to include all source files in a folder. But how can I exclude some specific files (in this example, /path/to/folder/main.cpp
and /path/to/folder/CMakeLists.txt
)?