diff options
Diffstat (limited to 'config/MasterIDE-CMakeLists.txt')
-rw-r--r-- | config/MasterIDE-CMakeLists.txt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/config/MasterIDE-CMakeLists.txt b/config/MasterIDE-CMakeLists.txt new file mode 100644 index 00000000..86df8a45 --- /dev/null +++ b/config/MasterIDE-CMakeLists.txt @@ -0,0 +1,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() |