source_group for all subdirectories

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

source_group for all subdirectories

tonka tonka


I want to use cmakes source_group with regex. As long as the command is in the same file as my target everything works fine, but I want to set the source_group in my main CMakeLists.txt file, because I have many sub_directories. Is it possible to set a cmake config to pass it down to my subdirectories?


source_group("Source Files" REGULAR_EXPRESSION ".*\\.cpp")
source_group("Header Files" REGULAR_EXPRESSION ".*\\.h")
source_group("Ui Files" REGULAR_EXPRESSION ".*\\.ui")
source_group("Resource Files" REGULAR_EXPRESSION ".*\\.qrc")



Powered by

Please keep messages on-topic and check the CMake FAQ at:

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support:
CMake Consulting:
CMake Training Courses:

Visit other Kitware open-source projects at

Follow this link to subscribe/unsubscribe: