diff --git a/CMakeLists.txt b/CMakeLists.txt index dbccf30416..516ffcd551 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,7 +103,9 @@ file(WRITE ${FETCH_FILE_PATH} "# ----------------------------------------------- # ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/$<$:Debug>$<$:Release> # -----------------------------------------------------------------------\n cmake_policy(SET CMP0012 NEW) -cmake_policy(SET CMP0054 NEW)\n") +cmake_policy(SET CMP0054 NEW)\n +message(STATUS \"CMAKE_CONFIG=\${CMAKE_CONFIG}\") +") set(TEST_WORKING_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") if(CMAKE_GENERATOR MATCHES "Visual Studio") @@ -112,7 +114,7 @@ endif() if(COMPLEX_BUILD_TESTS AND COMPLEX_DOWNLOAD_TEST_FILES) add_custom_target(Fetch_Remote_Data_Files ALL - COMMAND "${CMAKE_COMMAND}" -P "${FETCH_FILE_PATH}" + COMMAND "${CMAKE_COMMAND}" -DCMAKE_CONFIG=$ -P "${FETCH_FILE_PATH}" COMMENT "Downloading Test Data Files" # WORKING_DIRECTORY "${TEST_WORKING_DIR}" ) @@ -808,22 +810,23 @@ set(COMPLEX_PACKAGE_NAMESPACE "complex::") #------------------------------------------------------------------------------ # Install the appropriate example pipelines based on which plugins are loaded #------------------------------------------------------------------------------ -set(DATA_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/Data") -file(TO_CMAKE_PATH "${DREAM3D_DATA_DIR}" DREAM3D_DATA_DIR_NORM) -set(PIPELINE_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/pipelines") -if(NOT EXISTS "${PIPELINE_DEST_DIR}") - file(MAKE_DIRECTORY ${PIPELINE_DEST_DIR}) +get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) +if(is_multi_config) + set(CX_CONFIG_DIR "$") +else() + set(CX_CONFIG_DIR ".") endif() +set(DATA_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CX_CONFIG_DIR}/Data") +file(TO_CMAKE_PATH "${DREAM3D_DATA_DIR}" DREAM3D_DATA_DIR_NORM) +set(PIPELINE_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CX_CONFIG_DIR}/pipelines") set(PIPELINE_EXAMPLES_DEST_DIR "${PIPELINE_DEST_DIR}/Examples") -if(NOT EXISTS "${PIPELINE_EXAMPLES_DEST_DIR}") - file(MAKE_DIRECTORY ${PIPELINE_EXAMPLES_DEST_DIR}) -endif() if(COMPLEX_DOWNLOAD_TEST_FILES AND TARGET ComplexCore AND TARGET ITKImageProcessing AND TARGET OrientationAnalysis) add_custom_target(Copy_PorosityAnalysis_Pipelines ALL COMMAND ${CMAKE_COMMAND} -E copy_if_different "${complex_SOURCE_DIR}/pipelines/PorosityAnalysis.d3dpipeline" "${PIPELINE_EXAMPLES_DEST_DIR}/PorosityAnalysis.d3dpipeline" COMMENT "Copying Example Pipelines into Binary Directory" + COMMAND_EXPAND_LISTS VERBATIM ) set_target_properties(Copy_PorosityAnalysis_Pipelines PROPERTIES FOLDER ZZ_COPY_FILES) @@ -831,6 +834,7 @@ if(COMPLEX_DOWNLOAD_TEST_FILES AND TARGET ComplexCore AND TARGET ITKImageProcess add_custom_target(Copy_CAxis_Pipelines ALL COMMAND ${CMAKE_COMMAND} -E copy_if_different "${complex_SOURCE_DIR}/pipelines/Combo-EBSD-osc_r0c0.d3dpipeline" "${PIPELINE_EXAMPLES_DEST_DIR}/Combo-EBSD-osc_r0c0.d3dpipeline" COMMENT "Copying Example Pipelines into Binary Directory" + COMMAND_EXPAND_LISTS VERBATIM ) set_target_properties(Copy_CAxis_Pipelines PROPERTIES FOLDER ZZ_COPY_FILES) @@ -843,6 +847,8 @@ if(COMPLEX_DOWNLOAD_TEST_FILES AND TARGET ComplexCore AND TARGET ITKImageProcess WORKING_DIRECTORY "${DREAM3D_DATA_DIR}/TestFiles" COMMENT "[DATA EXTRACT/COPY] 6_6_caxis_data into Binary Directory" DEPENDS Fetch_Remote_Data_Files # Make sure all remote files are downloaded before trying this + COMMAND_EXPAND_LISTS + VERBATIM ) set_target_properties(Copy_CAxis_Data PROPERTIES FOLDER ZZ_COPY_FILES) endif() diff --git a/cmake/CopyDataFile.cmake.in b/cmake/CopyDataFile.cmake.in index d6407750ba..c8f0a03132 100644 --- a/cmake/CopyDataFile.cmake.in +++ b/cmake/CopyDataFile.cmake.in @@ -1,4 +1,7 @@ # -------------------------------------------------------------------------------------------------- # message(STATUS "[DATA COPY] Copy data from @ARGS_DREAM3D_DATA_DIR@/TestFiles/@ARCHIVE_BASE_NAME@") # -------------------------------------------------------------------------------------------------- -# execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory "@ARGS_DREAM3D_DATA_DIR@/TestFiles/@ARCHIVE_BASE_NAME@" "Data/@ARCHIVE_BASE_NAME@") +# execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory "@ARGS_DREAM3D_DATA_DIR@/TestFiles/@ARCHIVE_BASE_NAME@" "Data/@ARCHIVE_BASE_NAME@" +# COMMAND_EXPAND_LISTS +# VERBATIM +# ) diff --git a/cmake/Utility.cmake b/cmake/Utility.cmake index 0a58508c7e..ee070a91c0 100644 --- a/cmake/Utility.cmake +++ b/cmake/Utility.cmake @@ -109,9 +109,15 @@ function(download_test_data) #---------------------------------------------------------------------------- # Create the custom CMake File for this archive file #---------------------------------------------------------------------------- + get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(is_multi_config) + set(CX_CONFIG_DIR "\${CONFIG}") + else() + set(CX_CONFIG_DIR ".") + endif() + set(DATA_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CX_CONFIG_DIR}/Data") + set(fetch_data_file "${test_files_dir}/${ARGS_ARCHIVE_NAME}.cmake") - set(DATA_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/Data") - file(MAKE_DIRECTORY "${DATA_DEST_DIR}") # Strip off the .tar.gz extension string(REPLACE ".tar.gz" "" ARCHIVE_BASE_NAME "${ARGS_ARCHIVE_NAME}") @@ -126,8 +132,6 @@ function(download_test_data) file(REMOVE "${fetch_data_file}") # Remove the temporary file if(ARGS_COPY_DATA) - set(DATA_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/Data") - configure_file(${complex_SOURCE_DIR}/cmake/CopyDataFile.cmake.in ${fetch_data_file} @ONLY @@ -146,7 +150,6 @@ function(download_test_data) if(ARGS_INSTALL) # If we did NOT already copy the data, then do that now during the build if(NOT ARGS_COPY_DATA) - set(DATA_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/Data") configure_file(${complex_SOURCE_DIR}/cmake/CopyDataFile.cmake.in ${fetch_data_file} @ONLY @@ -156,6 +159,12 @@ function(download_test_data) file(REMOVE "${fetch_data_file}") endif() + if(is_multi_config) + set(CX_CONFIG_DIR "$") + else() + set(CX_CONFIG_DIR ".") + endif() + set(DATA_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CX_CONFIG_DIR}/Data") install(DIRECTORY "${DATA_DEST_DIR}/${ARCHIVE_BASE_NAME}" DESTINATION Data/ @@ -182,12 +191,21 @@ function(create_data_copy_rules) return() endif() + get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(is_multi_config) + set(CX_CONFIG_DIR "$") + else() + set(CX_CONFIG_DIR ".") + endif() - set(DATA_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/Data/") + set(DATA_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CX_CONFIG_DIR}/Data/") if(EXISTS "${ARGS_DREAM3D_DATA_DIR}/Data") add_custom_target(DataFolderCopy ALL COMMAND ${CMAKE_COMMAND} -E copy_directory ${ARGS_DREAM3D_DATA_DIR}/Data ${DATA_DEST_DIR} - COMMENT "Copying Data Folder into Binary Directory") + COMMENT "Copying Data Folder into Binary Directory" + COMMAND_EXPAND_LISTS + VERBATIM + ) set_target_properties(DataFolderCopy PROPERTIES FOLDER ZZ_COPY_FILES) set(DREAM3D_DATA_DIRECTORIES diff --git a/src/Plugins/ComplexCore/CMakeLists.txt b/src/Plugins/ComplexCore/CMakeLists.txt index cec636bfdf..962c09532a 100644 --- a/src/Plugins/ComplexCore/CMakeLists.txt +++ b/src/Plugins/ComplexCore/CMakeLists.txt @@ -345,12 +345,23 @@ source_group(TREE "${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}" PREFIX ${PLU # ----------------------------------------------------------------------- # Install example pipelines # ----------------------------------------------------------------------- +get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) +if(is_multi_config) + set(CX_CONFIG_DIR "$") +else() + set(CX_CONFIG_DIR ".") +endif() + + if(EXISTS "${${PLUGIN_NAME}_SOURCE_DIR}/pipelines") - set(PIPELINE_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/pipelines/${PLUGIN_NAME}") + set(PIPELINE_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CX_CONFIG_DIR}/pipelines/${PLUGIN_NAME}") add_custom_target(Copy_${PLUGIN_NAME}_Pipeline_Folder ALL COMMAND ${CMAKE_COMMAND} -E copy_directory "${${PLUGIN_NAME}_SOURCE_DIR}/pipelines" ${PIPELINE_DEST_DIR} - COMMENT "Copying Pipeline Folder into Binary Directory") + COMMENT "Copying Pipeline Folder into Binary Directory" + COMMAND_EXPAND_LISTS + VERBATIM + ) set_target_properties(Copy_${PLUGIN_NAME}_Pipeline_Folder PROPERTIES FOLDER Plugins/${PLUGIN_NAME}) option(${PLUGIN_NAME}_INSTALL_PIPELINES "Enables install of ${PLUGIN_NAME} pipelines" ON) @@ -369,7 +380,7 @@ endif() # Download Example Data Files # ----------------------------------------------------------------------- include(${complex_SOURCE_DIR}/cmake/Utility.cmake) -set(DATA_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/Data") +set(DATA_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CX_CONFIG_DIR}/Data") file(TO_CMAKE_PATH "${DREAM3D_DATA_DIR}" DREAM3D_DATA_DIR_NORM) @@ -390,11 +401,13 @@ if(EXISTS "${DREAM3D_DATA_DIR}" AND COMPLEX_DOWNLOAD_TEST_FILES) ) add_custom_target(Copy_${PLUGIN_NAME}_ASCIIData ALL COMMAND ${CMAKE_COMMAND} -E tar xzf "${DREAM3D_DATA_DIR}/TestFiles/ASCIIData.tar.gz" - COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different "${DREAM3D_DATA_DIR}/TestFiles/ASCIIData" "${DATA_DEST_DIR}/ASCIIData" + COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different "${DREAM3D_DATA_DIR}/TestFiles/ASCIIData" "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CX_CONFIG_DIR}/Data/ASCIIData" COMMAND ${CMAKE_COMMAND} -E rm -rf "${DREAM3D_DATA_DIR}/TestFiles/ASCIIData" WORKING_DIRECTORY "${DREAM3D_DATA_DIR}/TestFiles" COMMENT "Copying ${PLUGIN_NAME}/ASCIIData data into Binary Directory" DEPENDS Fetch_Remote_Data_Files # Make sure all remote files are downloaded before trying this + COMMAND_EXPAND_LISTS + VERBATIM ) set_target_properties(Copy_${PLUGIN_NAME}_ASCIIData PROPERTIES FOLDER Plugins/${PLUGIN_NAME}) @@ -406,11 +419,13 @@ if(EXISTS "${DREAM3D_DATA_DIR}" AND COMPLEX_DOWNLOAD_TEST_FILES) ) add_custom_target(Copy_${PLUGIN_NAME}_STL_Models ALL COMMAND ${CMAKE_COMMAND} -E tar xzf "${DREAM3D_DATA_DIR}/TestFiles/STL_Models.tar.gz" - COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different "${DREAM3D_DATA_DIR}/TestFiles/STL_Models" "${DATA_DEST_DIR}/STL_Models" + COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different "${DREAM3D_DATA_DIR}/TestFiles/STL_Models" "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CX_CONFIG_DIR}/Data/STL_Models" COMMAND ${CMAKE_COMMAND} -E rm -rf "${DREAM3D_DATA_DIR}/TestFiles/STL_Models" WORKING_DIRECTORY "${DREAM3D_DATA_DIR}/TestFiles" COMMENT "Copying ${PLUGIN_NAME}/STL_Models data into Binary Directory" DEPENDS Fetch_Remote_Data_Files # Make sure all remote files are downloaded before trying this + COMMAND_EXPAND_LISTS + VERBATIM ) set_target_properties(Copy_${PLUGIN_NAME}_STL_Models PROPERTIES FOLDER Plugins/${PLUGIN_NAME}) diff --git a/src/Plugins/ITKImageProcessing/CMakeLists.txt b/src/Plugins/ITKImageProcessing/CMakeLists.txt index 9919338b92..d10cccdfe9 100644 --- a/src/Plugins/ITKImageProcessing/CMakeLists.txt +++ b/src/Plugins/ITKImageProcessing/CMakeLists.txt @@ -321,12 +321,21 @@ endif() # ----------------------------------------------------------------------- # Install example pipelines # ----------------------------------------------------------------------- +get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) +if(is_multi_config) + set(CX_CONFIG_DIR "$") +else() + set(CX_CONFIG_DIR ".") +endif() + if(EXISTS "${${PLUGIN_NAME}_SOURCE_DIR}/pipelines") - set(PIPELINE_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/pipelines/${PLUGIN_NAME}") + set(PIPELINE_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CX_CONFIG_DIR}/pipelines/${PLUGIN_NAME}") add_custom_target(Copy_${PLUGIN_NAME}_Pipeline_Folder ALL COMMAND ${CMAKE_COMMAND} -E copy_directory "${${PLUGIN_NAME}_SOURCE_DIR}/pipelines" ${PIPELINE_DEST_DIR} COMMENT "Copying Pipeline Folder into Binary Directory" + COMMAND_EXPAND_LISTS + VERBATIM ) set_target_properties(Copy_${PLUGIN_NAME}_Pipeline_Folder PROPERTIES FOLDER Plugins/${PLUGIN_NAME}) @@ -346,7 +355,7 @@ endif() # Download Example Data Files # ----------------------------------------------------------------------- include(${complex_SOURCE_DIR}/cmake/Utility.cmake) -set(DATA_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/Data") +set(DATA_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CX_CONFIG_DIR}/Data") file(TO_CMAKE_PATH "${DREAM3D_DATA_DIR}" DREAM3D_DATA_DIR_NORM) @@ -376,6 +385,8 @@ if(EXISTS "${DREAM3D_DATA_DIR}" AND COMPLEX_DOWNLOAD_TEST_FILES) WORKING_DIRECTORY "${DREAM3D_DATA_DIR}/TestFiles" COMMENT "Copying ${PLUGIN_NAME}/Porosity_Image data into Binary Directory" DEPENDS Fetch_Remote_Data_Files # Make sure all remote files are downloaded before trying this + COMMAND_EXPAND_LISTS + VERBATIM ) set_target_properties(Copy_${PLUGIN_NAME}_Porosity_Image PROPERTIES FOLDER Plugins/${PLUGIN_NAME}) endif() @@ -390,6 +401,8 @@ if(FALSE) add_custom_target(Copy_${PLUGIN_NAME}_Data ALL COMMAND ${CMAKE_COMMAND} -E copy_directory ${${PLUGIN_NAME}_SOURCE_DIR}/data ${DATA_DEST_DIR}/${PLUGIN_NAME} COMMENT "Copying ${PLUGIN_NAME} data into Binary Directory" + COMMAND_EXPAND_LISTS + VERBATIM ) set_target_properties(Copy_${PLUGIN_NAME}_Data PROPERTIES FOLDER Plugins/${PLUGIN_NAME}) diff --git a/src/Plugins/OrientationAnalysis/CMakeLists.txt b/src/Plugins/OrientationAnalysis/CMakeLists.txt index aa64f45d68..9fd9d64369 100644 --- a/src/Plugins/OrientationAnalysis/CMakeLists.txt +++ b/src/Plugins/OrientationAnalysis/CMakeLists.txt @@ -273,12 +273,22 @@ endif() # ----------------------------------------------------------------------- # Install example pipelines # ----------------------------------------------------------------------- +get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) +if(is_multi_config) + set(CX_CONFIG_DIR "$") +else() + set(CX_CONFIG_DIR ".") +endif() + if(EXISTS "${${PLUGIN_NAME}_SOURCE_DIR}/pipelines") - set(PIPELINE_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/pipelines/${PLUGIN_NAME}") + set(PIPELINE_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CX_CONFIG_DIR}/pipelines/${PLUGIN_NAME}") add_custom_target(Copy_${PLUGIN_NAME}_Pipeline_Folder ALL COMMAND ${CMAKE_COMMAND} -E copy_directory "${${PLUGIN_NAME}_SOURCE_DIR}/pipelines" ${PIPELINE_DEST_DIR} - COMMENT "Copying Pipeline Folder into Binary Directory") + COMMENT "Copying Pipeline Folder into Binary Directory" + COMMAND_EXPAND_LISTS + VERBATIM + ) set_target_properties(Copy_${PLUGIN_NAME}_Pipeline_Folder PROPERTIES FOLDER Plugins/${PLUGIN_NAME}) option(${PLUGIN_NAME}_INSTALL_PIPELINES "Enables install of ${PLUGIN_NAME} pipelines" ON) @@ -297,7 +307,7 @@ endif() # Download Example Data Files # ----------------------------------------------------------------------- include(${complex_SOURCE_DIR}/cmake/Utility.cmake) -set(DATA_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/Data") +set(DATA_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CX_CONFIG_DIR}/Data") file(TO_CMAKE_PATH "${DREAM3D_DATA_DIR}" DREAM3D_DATA_DIR_NORM) @@ -322,6 +332,8 @@ if(EXISTS "${DREAM3D_DATA_DIR}" AND COMPLEX_DOWNLOAD_TEST_FILES) WORKING_DIRECTORY "${DREAM3D_DATA_DIR}/TestFiles" COMMENT "Copying ${PLUGIN_NAME}/T12-MAI-2010 data into Binary Directory" DEPENDS Fetch_Remote_Data_Files # Make sure all remote files are downloaded before trying this + COMMAND_EXPAND_LISTS + VERBATIM ) set_target_properties(Copy_${PLUGIN_NAME}_T12-MAI-2010 PROPERTIES FOLDER Plugins/${PLUGIN_NAME}) @@ -337,6 +349,8 @@ if(EXISTS "${DREAM3D_DATA_DIR}" AND COMPLEX_DOWNLOAD_TEST_FILES) WORKING_DIRECTORY "${DREAM3D_DATA_DIR}/TestFiles" COMMENT "Copying ${PLUGIN_NAME}/Textured_Copper data into Binary Directory" DEPENDS Fetch_Remote_Data_Files # Make sure all remote files are downloaded before trying this + COMMAND_EXPAND_LISTS + VERBATIM ) set_target_properties(Copy_${PLUGIN_NAME}_Textured_Copper PROPERTIES FOLDER Plugins/${PLUGIN_NAME}) @@ -351,6 +365,8 @@ if(EXISTS "${DREAM3D_DATA_DIR}" AND COMPLEX_DOWNLOAD_TEST_FILES) WORKING_DIRECTORY "${DREAM3D_DATA_DIR}/TestFiles" COMMENT "Copying ${PLUGIN_NAME}/Small_IN100 data into Binary Directory" DEPENDS Fetch_Remote_Data_Files # Make sure all remote files are downloaded before trying this + COMMAND_EXPAND_LISTS + VERBATIM ) download_test_data(DREAM3D_DATA_DIR ${DREAM3D_DATA_DIR} @@ -364,6 +380,8 @@ if(EXISTS "${DREAM3D_DATA_DIR}" AND COMPLEX_DOWNLOAD_TEST_FILES) WORKING_DIRECTORY "${DREAM3D_DATA_DIR}/TestFiles" COMMENT "Copying ${PLUGIN_NAME} data into Binary Directory" DEPENDS Fetch_Remote_Data_Files # Make sure all remote files are downloaded before trying this + COMMAND_EXPAND_LISTS + VERBATIM ) set_target_properties(Copy_${PLUGIN_NAME}_H5Data PROPERTIES FOLDER ZZ_COPY_FILES) endif() @@ -375,7 +393,9 @@ endif() add_custom_target(Copy_${PLUGIN_NAME}_Data ALL COMMAND ${CMAKE_COMMAND} -E copy_directory ${${PLUGIN_NAME}_SOURCE_DIR}/data ${DATA_DEST_DIR}/${PLUGIN_NAME} COMMENT "Copying ${PLUGIN_NAME} data into Binary Directory" - ) + COMMAND_EXPAND_LISTS + VERBATIM +) set_target_properties(Copy_${PLUGIN_NAME}_Data PROPERTIES FOLDER Plugins/${PLUGIN_NAME}) option(${PLUGIN_NAME}_INSTALL_DATA_FILES "Enables install of ${PLUGIN_NAME} data files" ON) diff --git a/src/Plugins/OrientationAnalysis/test/CMakeLists.txt b/src/Plugins/OrientationAnalysis/test/CMakeLists.txt index 9d22143da8..3f74d0e01a 100644 --- a/src/Plugins/OrientationAnalysis/test/CMakeLists.txt +++ b/src/Plugins/OrientationAnalysis/test/CMakeLists.txt @@ -184,10 +184,18 @@ function(add_pipeline_test) set(COMPLEX_CTEST_TEST_DRIVER "${${PLUGIN_NAME}_BINARY_DIR}/PrebuiltPipelineTests/${test}.${TEST_SCRIPT_FILE_EXT}") # message(STATUS "==> ${COMPLEX_CTEST_TEST_DRIVER}") set(DELETE_FILE_COMMANDS "") + + get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(is_multi_config) + set(CX_CONFIG_DIR "$") + else() + set(CX_CONFIG_DIR ".") + endif() + if(WIN32) set(DATA_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/%CONFIG_DIR%/") else() - set(DATA_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/") + set(DATA_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CX_CONFIG_DIR}/") endif() foreach ( f ${ARGS_DELETE_FILE_LIST})