Commit 228a009b authored by Floris Berendsen's avatar Floris Berendsen
Browse files

WIP: moved Cmake demo file copying to Install target of Applications

SuperElastix/SuperElastix#14
parent cbe6f83c
......@@ -60,10 +60,22 @@ message(STATUS DemoDataContentLinks: ${DemoDataContentLinks})
foreach( DemoDataContentLink ${DemoContentLinks} )
string( REGEX REPLACE "\\.md5$" "" DemoDataContentLink ${DemoDataContentLink} )
ExternalData_Expand_Arguments( InstallDemo
DemoDataFilenames
InstallDemoFilenames
DATA{${DemoDataContentLink}}
)
endforeach()
# Copy some of the configuration files
install(FILES "${CMAKE_SOURCE_DIR}/../Testing/Unit/Data/Configuration/itkv4_SVF_ANTsCC.json"
"${CMAKE_SOURCE_DIR}/../Testing/Unit/Data/Configuration/itkv4_SVF_MSD.json"
"${CMAKE_SOURCE_DIR}/../Testing/Unit/Data/Configuration/elastix_Bspline_NC.json"
"${CMAKE_SOURCE_DIR}/../Testing/Unit/Data/Configuration/elastix_Bspline_MSD.json"
DESTINATION "${PROJECT_BINARY_DIR}/Demo/Configuration"
)
# Copy the demo scripts
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/Demo/" DESTINATION "${PROJECT_BINARY_DIR}/Demo" FILE_PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE GROUP_EXECUTE GROUP_READ GROUP_WRITE )
# Test data is downloaded when this target is built
ExternalData_Add_Target( InstallDemo )
#set_property(TARGET InstallDemo PROPERTY DEPENDS INSTALL)
\ No newline at end of file
......@@ -129,54 +129,3 @@ set( SUPERELASTIX_BINARY_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} )
configure_file( SuperElastixConfig.cmake.in SuperElastixConfig.cmake @ONLY IMMEDIATE )
configure_file( UseSuperElastix.cmake.in UseSuperElastix.cmake COPYONLY IMMEDIATE )
# ---------------------------------------------------------------------
# Install
# When building the "INSTALL" project of SuperElastix these files are installed
# Copy the SuperElastix executable
# install(TARGETS "SuperElastix"
# RUNTIME DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/installed"
# )
# Copy some of the configuration files
install(FILES "${SUPERELASTIX_UNITTEST_CONFIGURATION_DATA_DIR}/itkv4_SVF_ANTsCC.json"
"${SUPERELASTIX_UNITTEST_CONFIGURATION_DATA_DIR}/itkv4_SVF_MSD.json"
"${SUPERELASTIX_UNITTEST_CONFIGURATION_DATA_DIR}/elastix_Bspline_NC.json"
"${SUPERELASTIX_UNITTEST_CONFIGURATION_DATA_DIR}/elastix_Bspline_MSD.json"
DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/installed/Configuration"
)
# Copy some of the input data files
#TODO: normal copy installing does not work
#get_filename_component(ABS_INPUT_DIR ${SUPERELASTIX_UNITTEST_INPUT_DATA_DIR} REALPATH)
#install(FILES "${ABS_INPUT_DIR}/coneA2d64.mhd"
# "${ABS_INPUT_DIR}/coneA2d64.raw"
# "${ABS_INPUT_DIR}/coneB2d64.mhd"
# "${ABS_INPUT_DIR}/coneB2d64.raw"
# DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/installed/Data/"
#)
#TODO: data files are only present if SUPERELASTIX_BUILD_TESTING is enabled.
# copying these files should therefor be also via the ExternalData commands
# temporarilly solved by hard coding a copy based on the hashed files
set(EXTERNALDATA_OBJECT_DIR "${CMAKE_BINARY_DIR}/ExternalData/Objects/MD5")
install(FILES "${EXTERNALDATA_OBJECT_DIR}/10aa9442cc6a1fd518da83cedbfcbdd3"
DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/installed/Data/"
RENAME "coneA2d64.mhd")
install(FILES "${EXTERNALDATA_OBJECT_DIR}/2d0ff0e14af2155659429d6f137f209e"
DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/installed/Data/"
RENAME "coneA2d64.raw")
install(FILES "${EXTERNALDATA_OBJECT_DIR}/7c358ebe7f53f01a4fe23ee953fa45d4"
DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/installed/Data/"
RENAME "coneB2d64.mhd")
install(FILES "${EXTERNALDATA_OBJECT_DIR}/deb92a27f201be258dedf66b632a2571"
DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/installed/Data/"
RENAME "coneB2d64.raw")
# Copy the demo scripts
install(DIRECTORY "${CMAKE_SOURCE_DIR}/Install/" DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/installed" FILE_PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE GROUP_EXECUTE GROUP_READ GROUP_WRITE )
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment