# 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()