From 136c6da36dfe93776f795ac57e4807e15946d2b9 Mon Sep 17 00:00:00 2001 From: Mark Charlebois Date: Tue, 19 Jan 2016 14:12:40 -0800 Subject: [PATCH] Generalized use of external modules Signed-off-by: Mark Charlebois --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e2ce018f91..babb32f119 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -330,8 +330,10 @@ execute_process(COMMAND cmake -E make_directory ${ep_base}/Install/include) # set(module_libraries) foreach(module ${config_module_list}) - if(module MATCHES "Eagle") - add_subdirectory(${module} ${CMAKE_BINARY_DIR}/${module}) + string(REGEX MATCH "^[./]" external_module ${module}) + if(external_module) + get_filename_component(EXT_MODULE ${module} NAME) + add_subdirectory(${module} ${CMAKE_BINARY_DIR}/external_mod/${EXT_MODULE}) else() add_subdirectory(src/${module}) endif()