From 599bd706d36183230e144a7f365780c367145a6e Mon Sep 17 00:00:00 2001 From: Arnstein Ressem Date: Thu, 12 Jul 2018 12:15:26 +0000 Subject: Make it possible to dynamically add submodules for extra projects. --- CMakeLists.txt | 3 +++ functions.cmake | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 23dcef6d96d..276fed18ac5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,6 +115,9 @@ add_subdirectory(vespamalloc) add_subdirectory(vsm) add_subdirectory(zkfacade) +# Add any auxilliary projects +add_auxilliary_modules() + # Create module targets with name ${MODULE}+module depending on every target defined within that module __create_module_targets(TARGETS "module") diff --git a/functions.cmake b/functions.cmake index c0e07c1d362..bfff9d23ef6 100644 --- a/functions.cmake +++ b/functions.cmake @@ -547,3 +547,14 @@ endfunction() function(install_fat_java_artifact NAME) install(FILES "target/${NAME}-jar-with-dependencies.jar" DESTINATION lib/jars/) endfunction() + +function(add_auxilliary_modules) + if(EXTRA_PROJECTS) + foreach(PROJECT ${EXTRA_PROJECTS}) + get_filename_component(RELDIR ${PROJECT} NAME) + add_subdirectory(${PROJECT} ${RELDIR}) + endforeach() + endif() +endfunction() + + -- cgit v1.2.3