ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
If your concern are the header files I recommend you to use this simple pattern:
FILE(GLOB_RECURSE HEADER_FILES include *.h)
add_executable(executable_name mysourcefile.cpp ${HEADER_FILES} )
2 | No.2 Revision |
If your concern are the header files I recommend you to use this simple pattern:
FILE(GLOB_RECURSE HEADER_FILES include *.h)
add_executable(executable_name mysourcefile.cpp ${HEADER_FILES} )
It is also possible to create a different target (this may be better) to avoid adding the new files to the executable target.
FILE(GLOB_RECURSE HeadFiles "include/*.h") add_custom_target(headers SOURCES ${HeadFiles})
It is possible to do this with other files, like msg files, config files, launch files, etc.
The only issue here, is that you are introducing some code in CMake that has no too much sense and it is only useful for qtcreator (while the CMake philosophy is making the development independent to any IDE)
3 | No.3 Revision |
If your concern are the header files I recommend you to use this simple pattern:
FILE(GLOB_RECURSE HEADER_FILES include *.h)
add_executable(executable_name mysourcefile.cpp ${HEADER_FILES} )
It is also possible to create a different target (this may be better) to avoid adding the new files to the executable target.
FILE(GLOB_RECURSE HeadFiles
add_custom_target(headers SOURCES ${HeadFiles})"include/*.h")"include/*.h")
It is possible to do this with other files, like msg files, config files, launch files, etc.
The only issue here, is that you are introducing some code in CMake that has no too much sense and it is only useful for qtcreator (while the CMake philosophy is making the development independent to any IDE)