Generalized use of external modules

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois 2016-01-19 14:12:40 -08:00 committed by Julian Oes
parent 7d9a14dab5
commit 136c6da36d
1 changed files with 4 additions and 2 deletions

View File

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