From 291e251ec9272ff04a8b656edc40909e43f81886 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Tue, 12 Apr 2016 17:35:21 -0400 Subject: [PATCH 1/5] STYLE: GenerateCLP.cmake should only be copied. See #44 --- GenerateCLP/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GenerateCLP/CMakeLists.txt b/GenerateCLP/CMakeLists.txt index 2ad045f..01690ad 100644 --- a/GenerateCLP/CMakeLists.txt +++ b/GenerateCLP/CMakeLists.txt @@ -231,7 +231,7 @@ set(${PROJECT_NAME}_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BIN configure_file( GenerateCLP.cmake ${CMAKE_CURRENT_BINARY_DIR}/GenerateCLP.cmake - @ONLY + COPYONLY ) include(GenerateGenerateCLPConfig.cmake) From 429e9a85a28b9ad0a5b9e479893aff8883b177f9 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Tue, 12 Apr 2016 17:43:10 -0400 Subject: [PATCH 2/5] ENH: Fix GenerateCLP install rules. See #44 * Introduce GenerateCLP_INSTALL_CMAKE_DIR variable allowing to configure install location for "GenerateCLP.cmake" macro. * GenerateCLP_INSTALL_NO_DEVELOPMENT: Change default value from ON to OFF. This will ensure GenerateCLP macro and dependent files are installed by default. * GenerateCLPLauncher: - Update hardcoded location of ITK libraries. It was changed from "bin" to "lib" in ITKv4. - Update forward install dir to account for that fact both GenerateCLP and launcher are installed in the same directory. * Ensure following files are installed: - UseGenerateCLP.cmake - GenerateCLPConfig.cmake - GenerateCLP.cmake Co-authored-by: Nicole Aucoin --- GenerateCLP/CMakeLists.txt | 61 +++++++++++++------ GenerateCLP/GenerateCLPInstallConfig.cmake.in | 1 + 2 files changed, 42 insertions(+), 20 deletions(-) diff --git a/GenerateCLP/CMakeLists.txt b/GenerateCLP/CMakeLists.txt index 01690ad..17fb526 100644 --- a/GenerateCLP/CMakeLists.txt +++ b/GenerateCLP/CMakeLists.txt @@ -67,6 +67,14 @@ endif() #----------------------------------------------------------------------------- include(CTest) +#----------------------------------------------------------------------------- +# Install tree directories +#----------------------------------------------------------------------------- + +if(NOT DEFINED GenerateCLP_INSTALL_CMAKE_DIR) + set(GenerateCLP_INSTALL_CMAKE_DIR lib/GenerateCLP) +endif() + #----------------------------------------------------------------------------- # Output directories. #----------------------------------------------------------------------------- @@ -127,27 +135,12 @@ if(NOT DEFINED GenerateCLP_INSTALL_BIN_DIR) set(GenerateCLP_INSTALL_BIN_DIR bin) endif() if(NOT DEFINED ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT) - set(${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT ON) + set(${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT OFF) endif() if(NOT ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT) - install(TARGETS GenerateCLP RUNTIME - DESTINATION ${GenerateCLP_INSTALL_BIN_DIR} COMPONENT Development - ) -endif() - -# -------------------------------------------------------------------------- -# Install support files -# -------------------------------------------------------------------------- -if(NOT ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT) - install(FILES ${GenerateCLP_BINARY_DIR}/GenerateCLPConfig.cmake_install - DESTINATION lib/GenerateCLP - COMPONENT Development - RENAME GenerateCLPConfig.cmake - ) - install(FILES ${GenerateCLP_BINARY_DIR}/UseGenerateCLP.cmake_install - DESTINATION lib/GenerateCLP + install(TARGETS GenerateCLP + RUNTIME DESTINATION ${GenerateCLP_INSTALL_BIN_DIR} COMPONENT Development - RENAME UseGenerateCLP.cmake ) endif() @@ -177,12 +170,12 @@ set(GenerateCLP_FORWARD_PATH_BUILD " \\ ") set(GenerateCLP_FORWARD_PATH_INSTALL " \\ \".\", \\ - \"${ITK_DIR}/bin\", \\ + \"${ITK_DIR}/lib\", \\ ${json_forward_path_install} \\ \"${ModuleDescriptionParser_DIR}/bin\" \\ ") set(GenerateCLP_FORWARD_EXE GenerateCLP) -set(GenerateCLP_FORWARD_DIR_INSTALL "..") +set(GenerateCLP_FORWARD_DIR_INSTALL ".") # -------------------------------------------------------------------------- # Build launcher @@ -235,6 +228,34 @@ configure_file( ) include(GenerateGenerateCLPConfig.cmake) +# -------------------------------------------------------------------------- +# Install support files +# -------------------------------------------------------------------------- +if(NOT ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT) + + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/GenerateCLP.cmake + DESTINATION ${GenerateCLP_INSTALL_CMAKE_DIR} + COMPONENT Development + ) + + configure_file( + GenerateCLPInstallConfig.cmake.in + ${GenerateCLP_BINARY_DIR}/GenerateCLPConfig.cmake_install + @ONLY + ) + install(FILES ${GenerateCLP_BINARY_DIR}/GenerateCLPConfig.cmake_install + DESTINATION lib/GenerateCLP + COMPONENT Development + RENAME GenerateCLPConfig.cmake + ) + + install(FILES ${GenerateCLP_SOURCE_DIR}/UseGenerateCLP.cmake.in + DESTINATION lib/GenerateCLP + COMPONENT Development + RENAME UseGenerateCLP.cmake + ) +endif() + # -------------------------------------------------------------------------- # Testing # -------------------------------------------------------------------------- diff --git a/GenerateCLP/GenerateCLPInstallConfig.cmake.in b/GenerateCLP/GenerateCLPInstallConfig.cmake.in index 9c966f9..50beee6 100644 --- a/GenerateCLP/GenerateCLPInstallConfig.cmake.in +++ b/GenerateCLP/GenerateCLPInstallConfig.cmake.in @@ -9,6 +9,7 @@ endif(WIN32) set(GenerateCLP_INCLUDE_DIRS "${GenerateCLP_CONFIG_DIR}/../../include/GenerateCLP") set(GenerateCLP_LIBRARY_DIRS "${GenerateCLP_CONFIG_DIR}") +set(GenerateCLP_CMAKE_DIR "${GenerateCLP_CONFIG_DIR}") set(GenerateCLP_USE_FILE "${GenerateCLP_CONFIG_DIR}/UseGenerateCLP.cmake") set(GENERATECLP_EXE "${GenerateCLP_CONFIG_DIR}/../../bin/GenerateCLP") if(NOT WIN32) From a55a41c5616ce7d021f3e7a7c8e33e47c1e17ca8 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Tue, 12 Apr 2016 18:30:43 -0400 Subject: [PATCH 3/5] ENH: Add infrastructure to test GenerateCLP install rules. See #44 * Introduced "GenerateCLP-Install.cmake" script that is deleting the directory associated with CMAKE_INSTALL_PREFIX, and re-installing the files building the "install" target. * Introduced variable TEST_TREETYPE set to either "BuildTree" or "InstallTree". This variable allows to conditionally update the testing context in Configure, Build or Test steps associated with each examples. * For the "BuildTree" case, GenerateCLP_DIR is hardcoded in GenerateCLPTestPrerequisites whereas it is passed as test argument for the "InstallTree" case. Co-authored-by: Nicole Aucoin --- .../Testing/CMake/GenerateCLP-Install.cmake | 47 ++++++++++++++++ .../CMake/GenerateCLPTest-Configure.cmake | 12 ++++- .../GenerateCLPTestPrerequisites.cmake.in | 5 ++ GenerateCLP/Testing/CMakeLists.txt | 54 +++++++++++++++---- 4 files changed, 106 insertions(+), 12 deletions(-) create mode 100644 GenerateCLP/Testing/CMake/GenerateCLP-Install.cmake diff --git a/GenerateCLP/Testing/CMake/GenerateCLP-Install.cmake b/GenerateCLP/Testing/CMake/GenerateCLP-Install.cmake new file mode 100644 index 0000000..00171de --- /dev/null +++ b/GenerateCLP/Testing/CMake/GenerateCLP-Install.cmake @@ -0,0 +1,47 @@ + +# -------------------------------------------------------------------------- +# Sanity checks + +foreach(varname TEST_CMAKE_DIR TEST_BINARY_DIR TEST_INSTALL_DIR) + if(NOT DEFINED ${varname}) + message(FATAL_ERROR "Variable ${varname} is not DEFINED") + endif() +endforeach() + +include(${TEST_CMAKE_DIR}/GenerateCLPTestMacros.cmake) + +# -------------------------------------------------------------------------- +# Delete install directory if it exists +execute_process( + COMMAND ${CMAKE_COMMAND} -E remove_directory ${TEST_INSTALL_DIR} + ) + +# -------------------------------------------------------------------------- +# Create install directory +execute_process( + COMMAND ${CMAKE_COMMAND} -E make_directory ${TEST_INSTALL_DIR} + ) + +# -------------------------------------------------------------------------- +# Debug flags - Set to True to display the command as string +set(PRINT_COMMAND 0) + +# -------------------------------------------------------------------------- +# Install +set(install_target install) +if(WIN32) + set(install_target INSTALL) +endif() +set(command ${CMAKE_COMMAND} --build ${TEST_BINARY_DIR} --config Release --target ${install_target}) +execute_process( + COMMAND ${command} + WORKING_DIRECTORY ${TEST_BINARY_DIR} + OUTPUT_VARIABLE ov + RESULT_VARIABLE rv + ) + +print_command_as_string("${command}") + +if(rv) + message(FATAL_ERROR "Failed to install Test:\n${ov}") +endif() diff --git a/GenerateCLP/Testing/CMake/GenerateCLPTest-Configure.cmake b/GenerateCLP/Testing/CMake/GenerateCLPTest-Configure.cmake index 1085e1b..cde4f76 100644 --- a/GenerateCLP/Testing/CMake/GenerateCLPTest-Configure.cmake +++ b/GenerateCLP/Testing/CMake/GenerateCLPTest-Configure.cmake @@ -23,14 +23,24 @@ execute_process( # Debug flags - Set to True to display the command as string set(PRINT_COMMAND 0) +# -------------------------------------------------------------------------- +if(TEST_TREETYPE STREQUAL "BuildTree") + set(GenerateCLP_DIR ${GenerateCLP_BINARY_DIR}) +endif() + # -------------------------------------------------------------------------- # Configure set(command ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE:STRING=${generateclp_build_type} - -DGenerateCLP_DIR:PATH=${GenerateCLP_BINARY_DIR} + -DGenerateCLP_DIR:PATH=${GenerateCLP_DIR} -DGenerateCLP_USE_JSONCPP:BOOL=${GenerateCLP_USE_JSONCPP} -DJsonCpp_CMAKE_MODULE_PATH:PATH=${JsonCpp_CMAKE_MODULE_PATH} -G ${generateclp_cmake_generator} ${TEST_SOURCE_DIR}) +if(GenerateCLP_USE_JSONCPP) + list(APPEND command + -DJsonCpp_DIR:PATH=${JsonCpp_DIR} + ) +endif() execute_process( COMMAND ${command} WORKING_DIRECTORY ${TEST_BINARY_DIR} diff --git a/GenerateCLP/Testing/CMake/GenerateCLPTestPrerequisites.cmake.in b/GenerateCLP/Testing/CMake/GenerateCLPTestPrerequisites.cmake.in index 0fdb15f..44e600d 100644 --- a/GenerateCLP/Testing/CMake/GenerateCLPTestPrerequisites.cmake.in +++ b/GenerateCLP/Testing/CMake/GenerateCLPTestPrerequisites.cmake.in @@ -21,6 +21,11 @@ if(NOT EXISTS ${GenerateCLP_BINARY_DIR}) "GenerateCLP_BINARY_DIR [${GenerateCLP_BINARY_DIR}]") endif() +if(NOT ("${TEST_TREETYPE}" STREQUAL "BuildTree" OR "${TEST_TREETYPE}" STREQUAL "InstallTree")) + message(FATAL_ERROR "Variable TEST_TREETYPE is expected to be set to either 'BuildTree' or 'InstallTree'. +Current value is '${TEST_TREETYPE}'") +endif() + # -------------------------------------------------------------------------- # Attempt to guess GenerateCLP build type diff --git a/GenerateCLP/Testing/CMakeLists.txt b/GenerateCLP/Testing/CMakeLists.txt index e61087a..7ab15d5 100644 --- a/GenerateCLP/Testing/CMakeLists.txt +++ b/GenerateCLP/Testing/CMakeLists.txt @@ -8,23 +8,55 @@ configure_file( @ONLY ) +# +# Add test installing GenerateCLP +# +add_test(NAME GenerateCLP-Install + COMMAND ${CMAKE_COMMAND} + -DTEST_CMAKE_DIR:PATH=${GenerateCLP_SOURCE_DIR}/Testing/CMake + -DTEST_BINARY_DIR:PATH=${GenerateCLP_BINARY_DIR} + -DTEST_INSTALL_DIR:PATH=${CMAKE_INSTALL_PREFIX} + -P ${CMAKE_CURRENT_SOURCE_DIR}/CMake/GenerateCLP-Install.cmake) +set_property(TEST GenerateCLP-Install PROPERTY LABELS ${PROJECT_NAME}) + # # Helper macro # set(_previous_test "NODEPENDS") macro(generateclp_add_test cliname stepname) - set(testname GenerateCLPTest-${cliname}-${stepname}) - add_test(NAME ${testname} - COMMAND ${CMAKE_COMMAND} - -DTEST_SOURCE_DIR:PATH=${CMAKE_CURRENT_SOURCE_DIR}/${cliname} - -DTEST_BINARY_DIR:PATH=${CMAKE_CURRENT_BINARY_DIR}/${cliname} - -DTEST_CONFIGURATION:STRING=$ - -P ${CMAKE_CURRENT_SOURCE_DIR}/CMake/GenerateCLPTest-${stepname}.cmake) - if(NOT ${_previous_test} STREQUAL "NODEPENDS") - set_tests_properties(${testname} PROPERTIES DEPENDS ${_previous_test}) + + macro(_generateclp_add_tree_test treetype) + set(testname GenerateCLPTest-${treetype}-${cliname}-${stepname}) + set(_test_args + -DTEST_TREETYPE:STRING=${treetype} + -DTEST_SOURCE_DIR:PATH=${CMAKE_CURRENT_SOURCE_DIR}/${cliname} + -DTEST_BINARY_DIR:PATH=${CMAKE_CURRENT_BINARY_DIR}/${treetype}-${cliname} + -DTEST_CONFIGURATION:STRING=$ + ) + if("${treetype}" STREQUAL "InstallTree" AND "${stepname}" STREQUAL "Configure") + list(APPEND _test_args + -DGenerateCLP_DIR:PATH=${CMAKE_INSTALL_PREFIX}/lib/GenerateCLP/ + ) + endif() + + add_test(NAME ${testname} + COMMAND ${CMAKE_COMMAND} ${_test_args} + -P ${CMAKE_CURRENT_SOURCE_DIR}/CMake/GenerateCLPTest-${stepname}.cmake) + if(NOT ${_previous_test} STREQUAL "NODEPENDS") + set_tests_properties(${testname} PROPERTIES DEPENDS ${_previous_test}) + endif() + set(_previous_test ${testname}) + set_property(TEST ${testname} PROPERTY LABELS ${PROJECT_NAME}) + endmacro() + + # Build and install cases + _generateclp_add_tree_test(BuildTree) + _generateclp_add_tree_test(InstallTree) + if(stepname STREQUAL "Configure") + # Install case required GenerareCLP install tree + set_tests_properties(${testname} PROPERTIES DEPENDS GenerateCLP-Install) endif() - set(_previous_test ${testname}) - set_property(TEST ${testname} PROPERTY LABELS ${PROJECT_NAME}) + endmacro() # From 21714b99d908041a52e7d9d152f3e31ecd5436a5 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Tue, 12 Apr 2016 18:32:31 -0400 Subject: [PATCH 4/5] ENH: Update GenerateCLP tests to build/install its own GenerateCLP. See #44 This will ensure running the tests will not delete files associated with the current CMAKE_INSTALL_PREFIX. Co-authored-by: Nicole Aucoin --- .../Testing/CMake/GenerateCLP-Install.cmake | 57 +++++++++++++++++-- GenerateCLP/Testing/CMakeLists.txt | 20 ++++++- 2 files changed, 70 insertions(+), 7 deletions(-) diff --git a/GenerateCLP/Testing/CMake/GenerateCLP-Install.cmake b/GenerateCLP/Testing/CMake/GenerateCLP-Install.cmake index 00171de..4752ecd 100644 --- a/GenerateCLP/Testing/CMake/GenerateCLP-Install.cmake +++ b/GenerateCLP/Testing/CMake/GenerateCLP-Install.cmake @@ -2,7 +2,16 @@ # -------------------------------------------------------------------------- # Sanity checks -foreach(varname TEST_CMAKE_DIR TEST_BINARY_DIR TEST_INSTALL_DIR) +foreach(varname + CMAKE_BUILD_TYPE + CMAKE_GENERATOR + ModuleDescriptionParser_DIR + TCLAP_DIR + TEST_CMAKE_DIR + TEST_SOURCE_DIR + TEST_BINARY_DIR + TEST_INSTALL_DIR + ) if(NOT DEFINED ${varname}) message(FATAL_ERROR "Variable ${varname} is not DEFINED") endif() @@ -11,14 +20,16 @@ endforeach() include(${TEST_CMAKE_DIR}/GenerateCLPTestMacros.cmake) # -------------------------------------------------------------------------- -# Delete install directory if it exists +# Delete build and install directory if they exists execute_process( + COMMAND ${CMAKE_COMMAND} -E remove_directory ${TEST_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E remove_directory ${TEST_INSTALL_DIR} ) # -------------------------------------------------------------------------- -# Create install directory +# Create build and install directories execute_process( + COMMAND ${CMAKE_COMMAND} -E make_directory ${TEST_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E make_directory ${TEST_INSTALL_DIR} ) @@ -26,13 +37,51 @@ execute_process( # Debug flags - Set to True to display the command as string set(PRINT_COMMAND 0) +# -------------------------------------------------------------------------- +# Configure +set(command ${CMAKE_COMMAND} + -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} + -DCMAKE_INSTALL_PREFIX:PATH=${TEST_INSTALL_DIR} + -DModuleDescriptionParser_DIR:PATH=${ModuleDescriptionParser_DIR} + -DTCLAP_DIR:PATH=${TCLAP_DIR} + -G ${CMAKE_GENERATOR} ${TEST_SOURCE_DIR}) +execute_process( + COMMAND ${command} + WORKING_DIRECTORY ${TEST_BINARY_DIR} + OUTPUT_VARIABLE ov + RESULT_VARIABLE rv + ) + +print_command_as_string("${command}") + +if(rv) + message(FATAL_ERROR "Failed to configure Test:\n${ov}") +endif() + +# -------------------------------------------------------------------------- +# Build + +set(command ${CMAKE_COMMAND} --build ${TEST_BINARY_DIR} --config ${CMAKE_BUILD_TYPE}) +execute_process( + COMMAND ${command} + WORKING_DIRECTORY ${TEST_BINARY_DIR} + OUTPUT_VARIABLE ov + RESULT_VARIABLE rv + ) + +print_command_as_string("${command}") + +if(rv) + message(FATAL_ERROR "Failed to build Test:\n${ov}") +endif() + # -------------------------------------------------------------------------- # Install set(install_target install) if(WIN32) set(install_target INSTALL) endif() -set(command ${CMAKE_COMMAND} --build ${TEST_BINARY_DIR} --config Release --target ${install_target}) +set(command ${CMAKE_COMMAND} --build ${TEST_BINARY_DIR} --config ${CMAKE_BUILD_TYPE} --target ${install_target}) execute_process( COMMAND ${command} WORKING_DIRECTORY ${TEST_BINARY_DIR} diff --git a/GenerateCLP/Testing/CMakeLists.txt b/GenerateCLP/Testing/CMakeLists.txt index 7ab15d5..bee5504 100644 --- a/GenerateCLP/Testing/CMakeLists.txt +++ b/GenerateCLP/Testing/CMakeLists.txt @@ -11,11 +11,25 @@ configure_file( # # Add test installing GenerateCLP # + +set(GenerateCLPTest_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/GenerateCLP-install) + +if(CMAKE_CONFIGURATION_TYPES) + set(_build_type ${CMAKE_CFG_INTDIR}) +else() + set(_build_type ${CMAKE_BUILD_TYPE}) +endif() add_test(NAME GenerateCLP-Install COMMAND ${CMAKE_COMMAND} + -DBUILD_TESTING:BOOL=OFF + -DCMAKE_BUILD_TYPE:STRING=${_build_type} + -DCMAKE_GENERATOR:STRING=${CMAKE_GENERATOR} + -DModuleDescriptionParser_DIR:PATH=${ModuleDescriptionParser_BINARY_DIR} + -DTCLAP_DIR:PATH=${TCLAP_BINARY_DIR} -DTEST_CMAKE_DIR:PATH=${GenerateCLP_SOURCE_DIR}/Testing/CMake - -DTEST_BINARY_DIR:PATH=${GenerateCLP_BINARY_DIR} - -DTEST_INSTALL_DIR:PATH=${CMAKE_INSTALL_PREFIX} + -DTEST_BINARY_DIR:PATH=${CMAKE_CURRENT_BINARY_DIR}/GenerateCLP-build + -DTEST_INSTALL_DIR:PATH=${GenerateCLPTest_INSTALL_PREFIX} + -DTEST_SOURCE_DIR:PATH=${GenerateCLP_SOURCE_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/CMake/GenerateCLP-Install.cmake) set_property(TEST GenerateCLP-Install PROPERTY LABELS ${PROJECT_NAME}) @@ -35,7 +49,7 @@ macro(generateclp_add_test cliname stepname) ) if("${treetype}" STREQUAL "InstallTree" AND "${stepname}" STREQUAL "Configure") list(APPEND _test_args - -DGenerateCLP_DIR:PATH=${CMAKE_INSTALL_PREFIX}/lib/GenerateCLP/ + -DGenerateCLP_DIR:PATH=${GenerateCLPTest_INSTALL_PREFIX}/lib/GenerateCLP/ ) endif() From 8d82e1ad0dc681b00d0947e8e93d4e2d65c6563a Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Mon, 25 Apr 2016 16:49:05 -0400 Subject: [PATCH 5/5] WIP --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 73a5b0a..6a40806 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -133,6 +133,11 @@ if(NOT DEFINED SlicerExecutionModel_DEFAULT_CLI_INSTALL_ARCHIVE_DESTINATION) set(SlicerExecutionModel_DEFAULT_CLI_INSTALL_ARCHIVE_DESTINATION lib) endif() + +if(NOT DEFINED SlicerExecutionModel_SHARE_DESTINATION) + set(SlicerExecutionModel_SHARE_DESTINATION share) +endif() + #----------------------------------------------------------------------------- # Define default "cli library wrapper" used by SEMMacroBuildCLI.cmake #----------------------------------------------------------------------------- @@ -224,4 +229,7 @@ foreach(SCRIPT ${allscripts}) get_filename_component(_fileName ${SCRIPT} NAME) configure_file(${SCRIPT} ${CMAKE_CURRENT_BINARY_DIR}/CMake/${_fileName} COPYONLY IMMEDIATE) + install(FILES ${SCRIPT} DESTINATION ${SlicerExecutionModel_SHARE_DESTINATION} + COMPONENT Development + ) endforeach()