diff options
Diffstat (limited to 'cmake/macros')
-rw-r--r-- | cmake/macros/GroupSources.cmake | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cmake/macros/GroupSources.cmake b/cmake/macros/GroupSources.cmake index 198d8c3e187..f8e252fe41a 100644 --- a/cmake/macros/GroupSources.cmake +++ b/cmake/macros/GroupSources.cmake @@ -10,7 +10,7 @@ macro(GroupSources dir) # Skip this if WITH_SOURCE_TREE is not set (empty string). - if (NOT ${_WITH_SOURCE_TREE} STREQUAL "") + if (NOT ${WITH_SOURCE_TREE} STREQUAL "") # Include all header and c files file(GLOB_RECURSE elements RELATIVE ${dir} *.h *.hpp *.c *.cpp *.cc) @@ -21,7 +21,7 @@ macro(GroupSources dir) if (NOT ${element_dir} STREQUAL "") # If the file is in a subdirectory use it as source group. - if (${_WITH_SOURCE_TREE} STREQUAL "flat") + if (${WITH_SOURCE_TREE} STREQUAL "flat") # Build flat structure by using only the first subdirectory. string(FIND ${element_dir} "/" delemiter_pos) if (NOT ${delemiter_pos} EQUAL -1) @@ -44,3 +44,8 @@ macro(GroupSources dir) endforeach() endif() endmacro() + +if (WITH_SOURCE_TREE STREQUAL "hierarchical-folders") + # Use folders + set_property(GLOBAL PROPERTY USE_FOLDERS ON) +endif() |