aboutsummaryrefslogtreecommitdiffstats
path: root/config/MasterIDE-CMakeLists.txt
blob: 86df8a45013bca2f935a93a4c638691a9d39c2bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# This is a master CMakeLists.txt file for IDEs. If you are viewing this as
# CMakeLists.txt in the source directory IT IS A COPY and SHOULD NOT BE EDITED - 
# edit the MasterIDE-CMakeLists.txt in CCNx_Distillery/config instead.
#
cmake_minimum_required(VERSION 3.2)
project (master)

message("--- Collecting all sub-projects ---")

macro(Subdirs result parent)
    file(GLOB children LIST_DIRECTORIES true RELATIVE ${parent} "[^.]*")
    set(dirlist "")
    foreach(child ${children})
        if(IS_DIRECTORY ${parent}/${child})
            if(EXISTS ${parent}/${child}/CMakeLists.txt)
                list(APPEND dirlist ${child})
            endif()
        endif()
    endforeach()
    set(${result} ${dirlist})
endmacro()

Subdirs(modules ${CMAKE_SOURCE_DIR})

foreach(module ${modules})
    message("module: ${module}")
    set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/${module}/cmake/Modules")
    add_subdirectory(${module})
endforeach()