Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mirrors
SuperElastix
Commits
5af0e723
Commit
5af0e723
authored
Mar 14, 2017
by
Kasper Marstal
Browse files
Initial stab at installing SuperElastix
parent
09019529
Changes
2
Hide whitespace changes
Inline
Side-by-side
Applications/CommandLineInterface/CMakeLists.txt
View file @
5af0e723
...
...
@@ -48,8 +48,8 @@ include_directories( "${CMAKE_CURRENT_SOURCE_DIR}/include" )
add_executable
(
SuperElastix
${
COMMANDLINE_SOURCE_FILES
}
${
COMMANDLINE_HEADER_FILES
}
)
target_link_libraries
(
SuperElastix
${
SUPERELASTIX_LIBRARIES
}
${
Boost_LIBRARIES
}
)
#
InstallD
emo copies SuperElastix executable, image data, configuration files and bat/bash scripts to the
INSTALL
DEMO_PREFIX directory
set
(
INSTALL
DEMO_PREFIX
${
PROJECT_BINARY_DIR
}
/Demo CACHE PATH
"Demo files will be copied to this directory"
)
#
d
emo copies SuperElastix executable, image data, configuration files and bat/bash scripts to the DEMO_PREFIX directory
set
(
DEMO_PREFIX
${
PROJECT_BINARY_DIR
}
/Demo CACHE PATH
"Demo files will be copied to this directory"
)
# Download demo data
include
(
ExternalData
)
...
...
@@ -64,30 +64,30 @@ list( APPEND ExternalData_URL_TEMPLATES
file
(
GLOB_RECURSE DemoDataContentLinks
"*.md5"
)
foreach
(
DemoDataContentLink
${
DemoDataContentLinks
}
)
string
(
REGEX REPLACE
"
\\
.md5$"
""
DemoDataContentLink
${
DemoDataContentLink
}
)
ExternalData_Expand_Arguments
(
InstallD
emo
InstallD
emoFileName
ExternalData_Expand_Arguments
(
d
emo
d
emoFileName
DATA{
${
DemoDataContentLink
}
}
)
list
(
APPEND
InstallD
emoFileNames
${
InstallD
emoFileName
}
)
list
(
APPEND
d
emoFileNames
${
d
emoFileName
}
)
endforeach
()
# Create target and reference the external data
ExternalData_Add_Target
(
InstallD
emo
)
add_dependencies
(
InstallD
emo SuperElastix
)
set_target_properties
(
InstallD
emo PROPERTIES EXCLUDE_FROM_ALL TRUE
)
ExternalData_Add_Target
(
d
emo
)
add_dependencies
(
d
emo SuperElastix
)
set_target_properties
(
d
emo PROPERTIES EXCLUDE_FROM_ALL TRUE
)
foreach
(
InstallD
emoFileName
${
InstallD
emoFileNames
}
)
foreach
(
d
emoFileName
${
d
emoFileNames
}
)
add_custom_command
(
TARGET
InstallD
emo POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
INSTALL
DEMO_PREFIX
}
/Data
COMMAND
${
CMAKE_COMMAND
}
-E copy
${
InstallD
emoFileName
}
${
INSTALL
DEMO_PREFIX
}
/Data/
TARGET
d
emo POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
DEMO_PREFIX
}
/Data
COMMAND
${
CMAKE_COMMAND
}
-E copy
${
d
emoFileName
}
${
DEMO_PREFIX
}
/Data/
)
endforeach
()
# Copy executable
add_custom_command
(
TARGET
InstallD
emo POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E copy $<TARGET_FILE:SuperElastix>
${
INSTALL
DEMO_PREFIX
}
/$<TARGET_FILE_NAME:SuperElastix>
TARGET
d
emo POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E copy $<TARGET_FILE:SuperElastix>
${
DEMO_PREFIX
}
/$<TARGET_FILE_NAME:SuperElastix>
)
# Copy Configuration files
...
...
@@ -100,9 +100,9 @@ set( ConfigFiles
foreach
(
ConfigFile
${
ConfigFiles
}
)
add_custom_command
(
TARGET
InstallD
emo POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
INSTALL
DEMO_PREFIX
}
/Configuration
COMMAND
${
CMAKE_COMMAND
}
-E copy
"
${
CMAKE_SOURCE_DIR
}
/../Testing/Data/Configuration/
${
ConfigFile
}
"
${
INSTALL
DEMO_PREFIX
}
/Configuration/
${
ConfigFile
}
TARGET
d
emo POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
DEMO_PREFIX
}
/Configuration
COMMAND
${
CMAKE_COMMAND
}
-E copy
"
${
CMAKE_SOURCE_DIR
}
/../Testing/Data/Configuration/
${
ConfigFile
}
"
${
DEMO_PREFIX
}
/Configuration/
${
ConfigFile
}
)
endforeach
()
...
...
@@ -117,15 +117,15 @@ set( ScriptFiles
if
(
WIN32
)
foreach
(
ScriptFile
${
ScriptFiles
}
)
add_custom_command
(
TARGET
InstallD
emo POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
INSTALL
DEMO_PREFIX
}
/Scripts
COMMAND
${
CMAKE_COMMAND
}
-E copy
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/Demo/Scripts_Windows/
${
ScriptFile
}
.bat"
"
${
INSTALL
DEMO_PREFIX
}
/Scripts/
${
ScriptFile
}
.bat"
)
TARGET
d
emo POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
DEMO_PREFIX
}
/Scripts
COMMAND
${
CMAKE_COMMAND
}
-E copy
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/Demo/Scripts_Windows/
${
ScriptFile
}
.bat"
"
${
DEMO_PREFIX
}
/Scripts/
${
ScriptFile
}
.bat"
)
endforeach
()
else
(
WIN32
)
foreach
(
ScriptFile
${
ScriptFiles
}
)
add_custom_command
(
TARGET
InstallD
emo PRE_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
INSTALL
DEMO_PREFIX
}
/Scripts
COMMAND
${
CMAKE_COMMAND
}
-E copy
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/Demo/Scripts_Linux/
${
ScriptFile
}
.sh"
"
${
INSTALL
DEMO_PREFIX
}
/Scripts/
${
ScriptFile
}
.sh"
)
TARGET
d
emo PRE_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
DEMO_PREFIX
}
/Scripts
COMMAND
${
CMAKE_COMMAND
}
-E copy
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/Demo/Scripts_Linux/
${
ScriptFile
}
.sh"
"
${
DEMO_PREFIX
}
/Scripts/
${
ScriptFile
}
.sh"
)
endforeach
()
endif
(
WIN32
)
CMakeLists.txt
View file @
5af0e723
...
...
@@ -82,6 +82,12 @@ if( ${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC )
# set( MSVC_INCREMENTAL_DEFAULT ON )
endif
()
if
(
NOT CMAKE_BUILD_TYPE
)
set
(
CMAKE_BUILD_TYPE
"Release"
CACHE STRING
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel."
FORCE
)
endif
()
# ---------------------------------------------------------------------
# ITK
...
...
@@ -187,4 +193,20 @@ set( SUPERELASTIX_BINARY_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} )
get_directory_property
(
SUPERELASTIX_INCLUDE_DIRS INCLUDE_DIRECTORIES
)
configure_file
(
SuperElastixConfig.cmake.in SuperElastixConfig.cmake @ONLY IMMEDIATE
)
configure_file
(
UseSuperElastix.cmake.in UseSuperElastix.cmake COPYONLY IMMEDIATE
)
\ No newline at end of file
configure_file
(
UseSuperElastix.cmake.in UseSuperElastix.cmake COPYONLY IMMEDIATE
)
# ---------------------------------------------------------------------
# Installation
install
(
TARGETS ModuleFilter
DESTINATION lib
)
INSTALL
(
FILES Modules/Filter/include/selxSuperElastixFilter.h
Modules/Filter/include/selxSuperElastixFilterCustomComponents.h
Modules/Filter/include/itkUniquePointerDataObjectDecorator.h
Modules/Blueprints/include/selxBlueprint.h
Modules/Logger/include/selxLogger.h
Modules/FileIO/include/selxAnyFileReader.h
Modules/FileIO/include/selxAnyFileWriter.h
DESTINATION include
)
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment