From f4a0a6cf3460638397a91c7cbbaf21c6fd9eaa7f Mon Sep 17 00:00:00 2001 From: Sam Horvath Date: Wed, 29 Jan 2020 17:05:27 -0500 Subject: [PATCH] BUG: Add TBB bin dir to forward path --- CMakeLists.txt | 8 ++++++++ GenerateCLP/CMakeLists.txt | 19 +++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2d18ef9..8fa50ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -106,6 +106,7 @@ if(SlicerExecutionModel_USE_SERIALIZER) set(GenerateCLP_USE_SERIALIZER ON) endif() + #----------------------------------------------------------------------------- # Note: The default values defined below could be overwritten if passed when configuring # SlicerExecutionModel project. @@ -177,6 +178,10 @@ endmacro() endif() ### +SETIFEMPTY(SlicerExecutionModel_ADDITIONAL_FORWARD_PATHS_BUILD "" CACHE PATH "Specify additional forward build directory paths for GenerateCLPLauncher.") + +SETIFEMPTY(SlicerExecutionModel_ADDITIONAL_FORWARD_PATHS_INSTALL "" CACHE PATH "Specify additional forward install directory paths for GenerateCLPLauncher.") + SETIFEMPTY(TCLAP_DIR ${CMAKE_CURRENT_BINARY_DIR}/tclap CACHE PATH "Location of TCLAPConfig.cmake" FORCE) add_subdirectory(tclap) @@ -186,6 +191,9 @@ add_subdirectory(ModuleDescriptionParser) SETIFEMPTY(GenerateCLP_DIR ${CMAKE_CURRENT_BINARY_DIR}/GenerateCLP CACHE PATH "Location of GenerateCLPConfig.cmake" FORCE) add_subdirectory(GenerateCLP) + + + # -------------------------------------------------------------------------- # Set INCLUDE_DIRS variable # -------------------------------------------------------------------------- diff --git a/GenerateCLP/CMakeLists.txt b/GenerateCLP/CMakeLists.txt index d373213..0148362 100644 --- a/GenerateCLP/CMakeLists.txt +++ b/GenerateCLP/CMakeLists.txt @@ -157,6 +157,22 @@ endif() # where the binary is actually not in the same directory as the shared # libraries it depends on. # + +#Add additional forward paths +set(additional_forward_paths_build "") +foreach(lib_path ${SlicerExecutionModel_ADDITIONAL_FORWARD_PATHS_BUILD}) + string(APPEND additional_forward_paths_build + "\"${lib_path}\", " + ) +endforeach() + +set(additional_forward_paths_install "") +foreach(lib_path ${SlicerExecutionModel_ADDITIONAL_FORWARD_PATHS_INSTALL}) + string(APPEND additional_forward_paths_install + "\"${lib_path}\", " + ) +endforeach() + if(JsonCpp_FOUND) get_filename_component(json_library_dir ${JsonCpp_LIBRARY} DIRECTORY) set(json_forward_path_build @@ -171,17 +187,20 @@ set(GenerateCLP_FORWARD_PATH_BUILD " \\ \".\" CONFIG_DIR_POST, \\ \"${ITK_DIR}/bin\" CONFIG_DIR_POST, \\ ${json_forward_path_build} \\ + ${additional_forward_paths_build} \\ \"${ModuleDescriptionParser_DIR}/bin\" CONFIG_DIR_POST \\ ") set(GenerateCLP_FORWARD_PATH_INSTALL " \\ \".\", \\ \"${ITK_DIR}/bin\", \\ ${json_forward_path_install} \\ + ${additional_forward_paths_install} \\ \"${ModuleDescriptionParser_DIR}/bin\" \\ ") set(GenerateCLP_FORWARD_EXE GenerateCLP) set(GenerateCLP_FORWARD_DIR_INSTALL "..") + # -------------------------------------------------------------------------- # Build launcher # --------------------------------------------------------------------------