File: ProjectSourceGroup.cmake

package info (click to toggle)
dbus 1.16.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,056 kB
  • sloc: ansic: 106,015; xml: 9,270; sh: 1,967; python: 242; makefile: 230; cpp: 27
file content (18 lines) | stat: -rw-r--r-- 671 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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()
    endif()
endmacro()