summaryrefslogtreecommitdiff
path: root/cmake/modules/ProjectSourceGroup.cmake
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2011-01-31 17:38:10 +0000
committerSimon McVittie <smcv@debian.org>2011-01-31 17:38:10 +0000
commit7e5f91a2e50af075be865533eb6ebdfe6bc5b4ad (patch)
tree9d5bd881971b467f4452fa7ca2f1b12db9d68197 /cmake/modules/ProjectSourceGroup.cmake
parent24fbe571516161d48b499d587f9adb3e683dbf88 (diff)
downloaddbus-7e5f91a2e50af075be865533eb6ebdfe6bc5b4ad.tar.gz
Imported Upstream version 1.4.1upstream/1.4.1
Diffstat (limited to 'cmake/modules/ProjectSourceGroup.cmake')
-rw-r--r--cmake/modules/ProjectSourceGroup.cmake18
1 files changed, 18 insertions, 0 deletions
diff --git a/cmake/modules/ProjectSourceGroup.cmake b/cmake/modules/ProjectSourceGroup.cmake
new file mode 100644
index 00000000..713a67a1
--- /dev/null
+++ b/cmake/modules/ProjectSourceGroup.cmake
@@ -0,0 +1,18 @@
+# folders in the msvc projects
+# mode==flat : headers and ourses in no folders
+# mode==split : standard behavior of cmake, split headers and sources
+# mode== <other values" : code is in this folder
+macro(project_source_group mode sources headers)
+ #message(STATUS ${mode})
+ #message(STATUS ${sources} ${headers})
+ if(${mode} MATCHES "flat")
+ source_group("Source Files" Files)
+ source_group("Header Files" Files)
+ source_group("cmake" FILES CMakeLists.txt)
+ else(${mode} MATCHES "flat")
+ if(NOT ${mode} MATCHES "split")
+ source_group("${mode}" FILES ${${sources}} ${${headers}})
+ endif(NOT ${mode} MATCHES "split")
+ endif(${mode} MATCHES "flat")
+endmacro(project_source_group mode sources headers)
+