Commit 3aff076b authored by jcfr's avatar jcfr

ENH: Refactor Install rule variables to only be used in install commands.

Added a second set of variables named Slicer_<blah>_DIR which contain the appropriate directory prefixes such as bin lib share. These variables can be used reference file in the build or install trees such as the input/output of a configure command. Slicer_INSTALL_<blah> should only be used for install commands as on the Mac these variables will be prefixed with Slicer.app\Contents which we likely do not want in the root of the build tree.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@16771 3bd1e089-480b-0410-8dfb-8563597acbee
parent f4a54e0a
......@@ -63,7 +63,7 @@ set(${CLP}_PRIMARY_SOURCE ${BRAINSFit_SOURCE_DIR}/BRAINSFitPrimary.cxx)
CONFIGUREBRAINSORSLICERPROPERTIES(${CLP} BRAINSFitPrimary.xml "${${CLP}_SOURCE}" "${${CLP}_PRIMARY_SOURCE}" "BRAINSFitPrimary" "")
target_link_libraries( ${CLP} BRAINSCommonLib ${ITK_LIBRARIES} ${OPTIONAL_DEBUG_LINK_LIBRARIES})
INSTALL(TARGETS BRAINSFit DESTINATION bin)
INSTALL(TARGETS BRAINSFit DESTINATION ${Slicer_INSTALL_BIN_DIR})
if(BUILD_TESTING)
add_subdirectory(TestSuite)
......
......@@ -55,14 +55,14 @@ IF ( Java_JAVAC_EXECUTABLE )
# message (STATUS "Adding a custom target to jar it up into the plug ins directory ${CMAKE_BINARY_DIR}/${Slicer_INSTALL_PLUGINS_BIN_DIR}/${build_type}")
ADD_CUSTOM_TARGET ( ${CLP}.jar ALL
${Java_JAR_EXECUTABLE} cvf ${CMAKE_BINARY_DIR}/${Slicer_INSTALL_PLUGINS_BIN_DIR}/${build_type}/${CLP}.jar Examples
${Java_JAR_EXECUTABLE} cvf ${CMAKE_BINARY_DIR}/${Slicer_PLUGINS_BIN_DIR}/${build_type}/${CLP}.jar Examples
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )
ADD_DEPENDENCIES ( ${CLP}.jar ${CLP}.jar.classes )
# install the jar file
install (
FILES ${CMAKE_BINARY_DIR}/${Slicer_INSTALL_PLUGINS_BIN_DIR}/${build_type}/${CLP}.jar
FILES ${CMAKE_BINARY_DIR}/${Slicer_PLUGINS_BIN_DIR}/${build_type}/${CLP}.jar
DESTINATION ${Slicer_INSTALL_PLUGINS_BIN_DIR}
)
......@@ -82,7 +82,7 @@ IF ( Java_JAVAC_EXECUTABLE )
foreach(file ${TARGETS})
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/${file}
${CMAKE_BINARY_DIR}/${Slicer_INSTALL_PLUGINS_BIN_DIR}/${build_type}/${file}
${CMAKE_BINARY_DIR}/${Slicer_PLUGINS_BIN_DIR}/${build_type}/${file}
COPYONLY
)
endforeach(file)
......@@ -91,7 +91,7 @@ IF ( Java_JAVAC_EXECUTABLE )
# DESTINATION ${CMAKE_BINARY_DIR}/${Slicer_INSTALL_PLUGINS_BIN_DIR}/${build_type}
# )
install (
FILES ${CMAKE_BINARY_DIR}/${Slicer_INSTALL_PLUGINS_BIN_DIR}/${build_type}/${CLP}.tcl
FILES ${CMAKE_BINARY_DIR}/${Slicer_PLUGINS_BIN_DIR}/${build_type}/${CLP}.tcl
DESTINATION ${Slicer_INSTALL_PLUGINS_BIN_DIR}
)
endif (Slicer_SOURCE_DIR)
......@@ -124,7 +124,7 @@ if (Slicer_SOURCE_DIR)
foreach(file ${TARGETS})
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/${file}
${CMAKE_BINARY_DIR}/${Slicer_INSTALL_PLUGINS_BIN_DIR}/${build_type}/${file}
${CMAKE_BINARY_DIR}/${Slicer_PLUGINS_BIN_DIR}/${build_type}/${file}
COPYONLY
)
endforeach(file)
......
......@@ -22,7 +22,7 @@ file(GLOB TCLFILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "Tcl/*.tcl")
foreach(tclfile ${TCLFILES})
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/${tclfile}
${CMAKE_BINARY_DIR}/${Slicer_INSTALL_LIB_DIR}/${PROJECT_NAME}/${tclfile}
${CMAKE_BINARY_DIR}/${Slicer_LIB_DIR}/${PROJECT_NAME}/${tclfile}
COPYONLY)
endforeach(tclfile)
......@@ -35,7 +35,7 @@ file(GLOB IMAGEFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Tcl/ImageData/*.png
foreach(file ${IMAGEFILES})
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/${file}
${CMAKE_BINARY_DIR}/${Slicer_INSTALL_LIB_DIR}/${PROJECT_NAME}/${file}
${CMAKE_BINARY_DIR}/${Slicer_LIB_DIR}/${PROJECT_NAME}/${file}
COPYONLY
)
endforeach(file)
......
......@@ -204,7 +204,7 @@ file(GLOB COLORFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Resources/ColorFile
foreach(colorfile ${COLORFILES})
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/${colorfile}
${CMAKE_BINARY_DIR}/${Slicer_INSTALL_SHARE_DIR}/${PROJECT_NAME}/${colorfile}
${CMAKE_BINARY_DIR}/${Slicer_SHARE_DIR}/${PROJECT_NAME}/${colorfile}
COPYONLY
)
endforeach()
......
......@@ -37,7 +37,7 @@ ctkMacroCompilePythonScript(
SCRIPTS "${Slicer_PYTHON_SCRIPTS}"
RESOURCES "${Slicer_PYTHON_RESOURCES}"
DESTINATION_DIR ${Slicer_BINARY_DIR}/bin/Python
INSTALL_DIR ${Slicer_INSTALL_BIN_DIR}
INSTALL_DIR ${Slicer_PYTHON_INSTALL_DIR}
)
#-----------------------------------------------------------------------------
......
......@@ -242,9 +242,9 @@ TARGET_LINK_LIBRARIES(qSlicerIconEnginePlugin
# Install rules
INSTALL(TARGETS qSlicerIconEnginePlugin
RUNTIME DESTINATION lib/Slicer3/iconengines COMPONENT RuntimeLibraries
LIBRARY DESTINATION lib/Slicer3/iconengines COMPONENT RuntimeLibraries
ARCHIVE DESTINATION lib/Slicer3/iconengines COMPONENT Development
RUNTIME DESTINATION ${Slicer_INSTALL_LIB_DIR}/iconengines COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${Slicer_INSTALL_LIB_DIR}/iconengines COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${Slicer_INSTALL_LIB_DIR}/iconengines COMPONENT Development
)
# Since Qt expects the plugin to be directly located under the
# directory 'lib/Slicer3/iconengines', let's copy them.
......
......@@ -5,11 +5,11 @@ macro(slicer3_set_plugins_output_path)
set_target_properties(${ARGN}
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY
"${CMAKE_BINARY_DIR}/${Slicer_INSTALL_PLUGINS_BIN_DIR}"
"${CMAKE_BINARY_DIR}/${Slicer_PLUGINS_BIN_DIR}"
LIBRARY_OUTPUT_DIRECTORY
"${CMAKE_BINARY_DIR}/${Slicer_INSTALL_PLUGINS_LIB_DIR}"
"${CMAKE_BINARY_DIR}/${Slicer_PLUGINS_LIB_DIR}"
ARCHIVE_OUTPUT_DIRECTORY
"${CMAKE_BINARY_DIR}/${Slicer_INSTALL_PLUGINS_LIB_DIR}"
"${CMAKE_BINARY_DIR}/${Slicer_PLUGINS_LIB_DIR}"
)
endmacro(slicer3_set_plugins_output_path)
......
......@@ -88,9 +88,9 @@ MACRO(SlicerMacroBuildModuleVTKLibrary)
# Set loadable modules output path
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${Slicer_BINARY_DIR}/${Slicer_INSTALL_QTLOADABLEMODULES_BIN_DIR}"
LIBRARY_OUTPUT_DIRECTORY "${Slicer_BINARY_DIR}/${Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR}"
ARCHIVE_OUTPUT_DIRECTORY "${Slicer_BINARY_DIR}/${Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR}"
RUNTIME_OUTPUT_DIRECTORY "${Slicer_BINARY_DIR}/${Slicer_QTLOADABLEMODULES_BIN_DIR}"
LIBRARY_OUTPUT_DIRECTORY "${Slicer_BINARY_DIR}/${Slicer_QTLOADABLEMODULES_LIB_DIR}"
ARCHIVE_OUTPUT_DIRECTORY "${Slicer_BINARY_DIR}/${Slicer_QTLOADABLEMODULES_LIB_DIR}"
)
TARGET_LINK_LIBRARIES(${lib_name}
......
......@@ -134,9 +134,9 @@ MACRO(slicerMacroBuildQtModule)
# Set qt loadable modules output path
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${Slicer_BINARY_DIR}/${Slicer_INSTALL_QTLOADABLEMODULES_BIN_DIR}"
LIBRARY_OUTPUT_DIRECTORY "${Slicer_BINARY_DIR}/${Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR}"
ARCHIVE_OUTPUT_DIRECTORY "${Slicer_BINARY_DIR}/${Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR}"
RUNTIME_OUTPUT_DIRECTORY "${Slicer_BINARY_DIR}/${Slicer_QTLOADABLEMODULES_BIN_DIR}"
LIBRARY_OUTPUT_DIRECTORY "${Slicer_BINARY_DIR}/${Slicer_QTLOADABLEMODULES_LIB_DIR}"
ARCHIVE_OUTPUT_DIRECTORY "${Slicer_BINARY_DIR}/${Slicer_QTLOADABLEMODULES_LIB_DIR}"
)
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES LABELS ${lib_name})
......
......@@ -184,13 +184,31 @@ INCLUDE(SlicerBlockCXXRequiredFlags)
#-----------------------------------------------------------------------------
# Slicer install directories
#------------------------------------------------------------------------------
SET(Slicer_INSTALL_BIN_DIR "bin")
SET(Slicer_INSTALL_LIB_DIR "lib/Slicer3")
SET(Slicer_INSTALL_INCLUDE_DIR "include/Slicer")
SET(Slicer_INSTALL_SHARE_DIR "share/Slicer")
SET(Slicer_INSTALL_ITKFACTORIES_DIR "${Slicer_INSTALL_LIB_DIR}/ITKFactories")
# Set to create Bundle in a directory
SET(Slicer_BUNDLE_LOCATION ".")
SET(Slicer_BIN_DIR "bin")
SET(Slicer_LIB_DIR "lib/Slicer3")
SET(Slicer_INCLUDE_DIR "include/Slicer")
SET(Slicer_SHARE_DIR "share/Slicer")
SET(Slicer_ITKFACTORIES_DIR "${Slicer_LIB_DIR}/ITKFactories")
SET(Slicer_INSTALL_ROOT "")
IF(APPLE)
# Set to create Bundle
SET(Slicer_BUNDLE_LOCATION "Slicer.app/Contents")
SET(Slicer_INSTALL_ROOT "${Slicer_BUNDLE_LOCATION}")
SET(Slicer_INSTALL_BIN_DIR "${Slicer_BUNDLE_LOCATION}/${Slicer_BIN_DIR}")
SET(Slicer_INSTALL_LIB_DIR "${Slicer_BUNDLE_LOCATION}/${Slicer_LIB_DIR}")
SET(Slicer_INSTALL_INCLUDE_DIR "${Slicer_BUNDLE_LOCATION}/${Slicer_INCLUDE_DIR}")
SET(Slicer_PYTHON_INSTALL_DIR "${Slicer_INSTALL_BIN_DIR}")
SET(Slicer_INSTALL_SHARE_DIR "${Slicer_BUNDLE_LOCATION}/${Slicer_SHARE_DIR}")
SET(Slicer_INSTALL_ITKFACTORIES_DIR "${Slicer_INSTALL_LIB_DIR}/ITKFactories")
ELSE()
SET(Slicer_INSTALL_BIN_DIR "bin")
SET(Slicer_INSTALL_LIB_DIR "lib/Slicer3")
SET(Slicer_PYTHON_INSTALL_DIR ${Slicer_INSTALL_BIN_DIR})
SET(Slicer_INSTALL_ITKFACTORIES_DIR "${Slicer_INSTALL_LIB_DIR}/ITKFactories")
ENDIF()
#-----------------------------------------------------------------------------
# Qt - Slicer_REQUIRED_QT_MODULES
......@@ -243,7 +261,14 @@ SET(Slicer_VERSION_FULL "${Slicer_VERSION}.${Slicer_VERSION_PATCH}")
#-----------------------------------------------------------------------------
# Plugins and Modules install directories
#------------------------------------------------------------------------------
SET(Slicer_INSTALL_PLUGINS_BIN_DIR "${Slicer_INSTALL_LIB_DIR}/Plugins")
SET(Slicer_PLUGINS_BIN_DIR "${Slicer_BIN_DIR}")
SET(Slicer_PLUGINS_LIB_DIR "${Slicer_LIB_DIR}/Plugins")
SET(Slicer_PLUGINS_INCLUDE_DIR "${Slicer_INCLUDE_DIR}/Plugins")
SET(Slicer_PLUGINS_SHARE_DIR "${Slicer_SHARE_DIR}/Plugins")
SET(Slicer_PLUGINS_CACHE_DIR "${Slicer_LIB_DIR}/PluginsCache")
SET(Slicer_INSTALL_PLUGINS_BIN_DIR "${Slicer_INSTALL_BIN_DIR}")
SET(Slicer_INSTALL_PLUGINS_LIB_DIR "${Slicer_INSTALL_LIB_DIR}/Plugins")
SET(Slicer_INSTALL_PLUGINS_INCLUDE_DIR "${Slicer_INSTALL_INCLUDE_DIR}/Plugins")
SET(Slicer_INSTALL_PLUGINS_SHARE_DIR "${Slicer_INSTALL_SHARE_DIR}/Plugins")
......@@ -297,7 +322,7 @@ IF(BUILD_TESTING)
CONFIGURE_FILE(
${Slicer_SOURCE_DIR}/CTestConfig.cmake
${Slicer_BINARY_DIR}/${Slicer_INSTALL_LIB_DIR}/CTestConfig.cmake
${Slicer_BINARY_DIR}/${Slicer_BIN_DIR}/CTestConfig.cmake
COPYONLY)
ENDIF()
......@@ -309,6 +334,12 @@ ENDIF()
IF(Slicer_USE_PYTHONQT)
FIND_PACKAGE(PythonLibs REQUIRED)
FIND_PACKAGE(PythonInterp REQUIRED)
EXECUTE_PROCESS(
COMMAND ${PYTHON_EXECUTABLE} -c "import sys; print sys.version[:3]"
OUTPUT_VARIABLE Slicer_PYTHON_VERSION_DOT
OUTPUT_STRIP_TRAILING_WHITESPACE)
STRING(REGEX REPLACE "[.]" "" Slicer_PYTHON_VERSION ${Slicer_PYTHON_VERSION_DOT})
ENDIF()
#-----------------------------------------------------------------------------
......@@ -411,6 +442,11 @@ SET(TCL_TK_VERSION "84")
SET(INCR_TCL_VERSION_DOT "3.2")
SET(INCR_TCL_VERSION "32")
#-----------------------------------------------------------------------------
# Python Version info
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Set Slicer buildin libraries *_DIR variables
#-----------------------------------------------------------------------------
......@@ -424,18 +460,30 @@ SET(vtkITK_DIR ${Slicer_BINARY_DIR}/Libs/vtkITK)
# Qt Loadable and Scripted Modules
#-----------------------------------------------------------------------------
IF(Slicer_BUILD_QTLOADABLEMODULES)
SET(Slicer_QTLOADABLEMODULES_BIN_DIR "${Slicer_BIN_DIR}/QTLoadableModules")
SET(Slicer_QTLOADABLEMODULES_LIB_DIR "${Slicer_LIB_DIR}/QTLoadableModules")
SET(Slicer_QTLOADABLEMODULES_INCLUDE_DIR "${Slicer_INCLUDE_DIR}/QTLoadableModules")
SET(Slicer_QTLOADABLEMODULES_SHARE_DIR "${Slicer_SHARE_DIR}/QTLoadableModules")
SET(Slicer_INSTALL_QTLOADABLEMODULES_BIN_DIR "${Slicer_INSTALL_LIB_DIR}/QTLoadableModules")
SET(Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR "${Slicer_INSTALL_LIB_DIR}/QTLoadableModules")
SET(Slicer_INSTALL_QTLOADABLEMODULES_INCLUDE_DIR "${Slicer_INSTALL_INCLUDE_DIR}/QTLoadableModules")
SET(Slicer_INSTALL_QTLOADABLEMODULES_SHARE_DIR "${Slicer_INSTALL_SHARE_DIR}/QTLoadableModules")
ENDIF()
IF(Slicer_BUILD_QTSCRIPTEDMODULES)
SET(Slicer_INSTALL_QTSCRIPTEDMODULES_BIN_DIR "${Slicer_INSTALL_LIB_DIR}/QTScriptedModules")
SET(Slicer_QTSCRIPTEDMODULES_BIN_DIR "${Slicer_BIN_DIR}/QTScriptedModules")
SET(Slicer_QTSCRIPTEDMODULES_LIB_DIR "${Slicer_LIB_DIR}/QTScriptedModules")
SET(Slicer_QTSCRIPTEDMODULES_INCLUDE_DIR "${Slicer_INCLUDE_DIR}/QTScriptedModules")
SET(Slicer_QTSCRIPTEDMODULES_SHARE_DIR "${Slicer_SHARE_DIR}/QTScriptedModules")
SET(Slicer_INSTALL_QTSCRIPTEDMODULES_BIN_DIR "${Slicer_INSTALL_BIN_DIR}/QTScriptedModules")
SET(Slicer_INSTALL_QTSCRIPTEDMODULES_LIB_DIR "${Slicer_INSTALL_LIB_DIR}/QTScriptedModules")
SET(Slicer_INSTALL_QTSCRIPTEDMODULES_INCLUDE_DIR "${Slicer_INSTALL_INCLUDE_DIR}/QTScriptedModules")
SET(Slicer_INSTALL_QTSCRIPTEDMODULES_SHARE_DIR "${Slicer_INSTALL_SHARE_DIR}/QTScriptedModules")
ENDIF()
# --------------------------------------------------------------------------
# Configure and install headers
# --------------------------------------------------------------------------
......@@ -611,10 +659,10 @@ ENDIF()
CONFIGURE_FILE(
${Slicer_SOURCE_DIR}/launch.tcl.in
"${Slicer_BINARY_DIR}/${Slicer_INSTALL_LIB_DIR}/launch.tcl"
"${Slicer_BINARY_DIR}/${Slicer_LIB_DIR}/launch.tcl"
)
INSTALL(
FILES "${Slicer_BINARY_DIR}/${Slicer_INSTALL_LIB_DIR}/launch.tcl"
FILES "${Slicer_BINARY_DIR}/${Slicer_LIB_DIR}/launch.tcl"
DESTINATION ${Slicer_INSTALL_LIB_DIR}
)
......@@ -647,8 +695,17 @@ ENDIF()
#-----------------------------------------------------------------------------
# Package slicer
#-----------------------------------------------------------------------------
INCLUDE(SlicerCPack.cmake)
# IMPORTANT:
# Keep this chunk of code here at the very bottom of the main
# CMakeLists.txt file so that the install rules that install the
# bundles and any files inside of them are already run before these
# script steps are run.
ADD_SUBDIRECTORY(Utilities/Package)
#-----------------------------------------------------------------------------
# The commands in this directory are intended to be executed as
# the end of the whole configuration process, as a "last step".
......
......@@ -144,9 +144,10 @@ foreach(file ${RESFILES})
COPYONLY
)
endforeach()
install(
FILES ${RESFILES}
DESTINATION share/${PROJECT_NAME}
DESTINATION ${Slicer_INSTALL_ROOT}/share/${PROJECT_NAME}
)
# --------------------------------------------------------------------------
......@@ -183,7 +184,7 @@ IF(NOT ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
install(DIRECTORY
Testing
DESTINATION share/${PROJECT_NAME} COMPONENT Development
DESTINATION ${Slicer_INSTALL_SHARE_DIR}/${PROJECT_NAME} COMPONENT Development
PATTERN "*.cxx" EXCLUDE
PATTERN ".svn" EXCLUDE
PATTERN "*.tcl" EXCLUDE
......
......@@ -115,14 +115,15 @@ endif(NOT DEFINED MGHImageIO_INSTALL_ITKFACTORIES_DIR)
add_library(MGHIOPlugin SHARED
itkMGHIOPlugin.cxx
)
set_target_properties(MGHIOPlugin
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY
"${CMAKE_BINARY_DIR}/${MGHImageIO_INSTALL_ITKFACTORIES_DIR}"
"${CMAKE_BINARY_DIR}/${Slicer_ITKFACTORIES_DIR}"
LIBRARY_OUTPUT_DIRECTORY
"${CMAKE_BINARY_DIR}/${MGHImageIO_INSTALL_ITKFACTORIES_DIR}"
"${CMAKE_BINARY_DIR}/${Slicer_ITKFACTORIES_DIR}"
ARCHIVE_OUTPUT_DIRECTORY
"${CMAKE_BINARY_DIR}/${MGHImageIO_INSTALL_ITKFACTORIES_DIR}"
"${CMAKE_BINARY_DIR}/${Slicer_ITKFACTORIES_DIR}"
)
target_link_libraries(MGHIOPlugin
${lib_name}
......@@ -149,15 +150,15 @@ install(TARGETS MGHIOPlugin
if(APPLE)
add_custom_command(
TARGET MGHIOPlugin
DEPENDS "${CMAKE_BINARY_DIR}/${MGHImageIO_INSTALL_ITKFACTORIES_DIR}/libMGHIOPlugin.dylib"
DEPENDS "${CMAKE_BINARY_DIR}/${Slicer_ITKFACTORIES_DIR}/libMGHIOPlugin.dylib"
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
"${CMAKE_BINARY_DIR}/${MGHImageIO_INSTALL_ITKFACTORIES_DIR}/libMGHIOPlugin.dylib"
"${CMAKE_BINARY_DIR}/${MGHImageIO_INSTALL_ITKFACTORIES_DIR}/libMGHIOPlugin.so"
"${CMAKE_BINARY_DIR}/${Slicer_ITKFACTORIES_DIR}/libMGHIOPlugin.dylib"
"${CMAKE_BINARY_DIR}/${Slicer_ITKFACTORIES_DIR}/libMGHIOPlugin.so"
VERBATIM
)
install(FILES
"${CMAKE_BINARY_DIR}/${MGHImageIO_INSTALL_ITKFACTORIES_DIR}/libMGHIOPlugin.so"
"${CMAKE_BINARY_DIR}/${Slicer_ITKFACTORIES_DIR}/libMGHIOPlugin.so"
DESTINATION ${MGHImageIO_INSTALL_ITKFACTORIES_DIR}
)
endif()
......@@ -119,14 +119,15 @@ endif()
add_library(MRMLIDIOPlugin SHARED
itkMRMLIDIOPlugin.cxx
)
set_target_properties(MRMLIDIOPlugin
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY
"${CMAKE_BINARY_DIR}/${MRMLIDImageIO_INSTALL_ITKFACTORIES_DIR}"
"${CMAKE_BINARY_DIR}/${Slicer_ITKFACTORIES_DIR}"
LIBRARY_OUTPUT_DIRECTORY
"${CMAKE_BINARY_DIR}/${MRMLIDImageIO_INSTALL_ITKFACTORIES_DIR}"
"${CMAKE_BINARY_DIR}/${Slicer_ITKFACTORIES_DIR}"
ARCHIVE_OUTPUT_DIRECTORY
"${CMAKE_BINARY_DIR}/${MRMLIDImageIO_INSTALL_ITKFACTORIES_DIR}"
"${CMAKE_BINARY_DIR}/${Slicer_ITKFACTORIES_DIR}"
)
target_link_libraries(MRMLIDIOPlugin ${lib_name})
......@@ -146,15 +147,15 @@ install(TARGETS MRMLIDIOPlugin
if(APPLE)
add_custom_command(
TARGET MRMLIDIOPlugin
DEPENDS "${CMAKE_BINARY_DIR}/${MRMLIDImageIO_INSTALL_ITKFACTORIES_DIR}/libMRMLIDIOPlugin.dylib"
DEPENDS "${CMAKE_BINARY_DIR}/${Slicer_ITKFACTORIES_DIR}/libMRMLIDIOPlugin.dylib"
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
"${CMAKE_BINARY_DIR}/${MRMLIDImageIO_INSTALL_ITKFACTORIES_DIR}/libMRMLIDIOPlugin.dylib"
"${CMAKE_BINARY_DIR}/${MRMLIDImageIO_INSTALL_ITKFACTORIES_DIR}/libMRMLIDIOPlugin.so"
"${CMAKE_BINARY_DIR}/${Slicer_ITKFACTORIES_DIR}/libMRMLIDIOPlugin.dylib"
"${CMAKE_BINARY_DIR}/${Slicer_ITKFACTORIES_DIR}/libMRMLIDIOPlugin.so"
VERBATIM
)
install(FILES
"${CMAKE_BINARY_DIR}/${MRMLIDImageIO_INSTALL_ITKFACTORIES_DIR}/libMRMLIDIOPlugin.so"
"${CMAKE_BINARY_DIR}/${Slicer_ITKFACTORIES_DIR}/libMRMLIDIOPlugin.so"
DESTINATION ${MRMLIDImageIO_INSTALL_ITKFACTORIES_DIR}
)
endif()
......@@ -10,13 +10,13 @@ SET(EditorLib_PYTHON_SCRIPTS
SET(EditorLib_PYTHON_RESOURCES
)
ctkMacroCompilePythonScript(
TARGET_NAME EditorLib
SCRIPTS "${EditorLib_PYTHON_SCRIPTS}"
RESOURCES "${EditorLib_PYTHON_RESOURCES}"
DESTINATION_DIR ${Slicer_BINARY_DIR}/bin/Python/EditorLib
INSTALL_DIR ${Slicer_INSTALL_BIN_DIR}
INSTALL_DIR ${Slicer_PYTHON_INSTALL_DIR}
)
#-----------------------------------------------------------------------------
......
......@@ -19,6 +19,6 @@ ctkMacroCompilePythonScript(
TARGET_NAME SlicerQTScriptedModules
SCRIPTS "${KIT_PYTHON_SCRIPTS}"
RESOURCES "${KIT_PYTHON_RESOURCES}"
DESTINATION_DIR ${Slicer_BINARY_DIR}/${Slicer_INSTALL_QTSCRIPTEDMODULES_LIB_DIR}
DESTINATION_DIR ${Slicer_BINARY_DIR}/${Slicer_QTSCRIPTEDMODULES_LIB_DIR}
INSTALL_DIR ${Slicer_INSTALL_LIB_DIR}
)
......@@ -17,7 +17,7 @@ IF(NOT Slicer_INSTALL_NO_DEVELOPMENT)
foreach(pngfile ${PNGFILES})
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/${pngfile}
"${CMAKE_BINARY_DIR}/${Slicer_INSTALL_SHARE_DIR}/Resources/${pngfile}"
"${CMAKE_BINARY_DIR}/${Slicer_SHARE_DIR}/Resources/${pngfile}"
COPYONLY
)
endforeach()
......@@ -35,7 +35,7 @@ file(GLOB PARAMETERSETS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "ParameterSets/*.
foreach(parameterset ${PARAMETERSETS})
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/${parameterset}
"${CMAKE_BINARY_DIR}/${Slicer_INSTALL_SHARE_DIR}/Resources/${parameterset}"
"${CMAKE_BINARY_DIR}/${Slicer_SHARE_DIR}/Resources/${parameterset}"
COPYONLY
)
endforeach()
......
......@@ -46,16 +46,16 @@ SET(launcher_binary
# MESSAGE(STATUS "launcher_source: ${launcher_source}")
# MESSAGE(STATUS "launcher_binary: ${launcher_binary}")
if(EXISTS "${launcher_source}")
if(EXISTS "${launcher_source}" AND NOT APPLE)
configure_file("${launcher_source}" "${launcher_binary}" COPYONLY)
install(PROGRAMS "${launcher_binary}" DESTINATION ".")
endif(EXISTS "${launcher_source}")
endif(EXISTS "${launcher_source}" AND NOT APPLE)
# Should this location change, change Application/GUI/Slicer3.cxx as well
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/3DSlicerLogoICOimages/slicer3.ico"
"${Slicer_BINARY_DIR}/${Slicer_INSTALL_SHARE_DIR}/Resources/slicer3.ico"
"${Slicer_BINARY_DIR}/${Slicer_SHARE_DIR}/Resources/slicer3.ico"
COPYONLY)
install(
FILES "${CMAKE_CURRENT_SOURCE_DIR}/3DSlicerLogoICOimages/slicer3.ico"
......
......@@ -30,32 +30,32 @@
#define VTKSLICER_CONFIGURATION_TYPES "@CMAKE_CONFIGURATION_TYPES@"
#define Slicer_INSTALL_BIN_DIR "@Slicer_INSTALL_BIN_DIR@"
#define Slicer_INSTALL_LIB_DIR "@Slicer_INSTALL_LIB_DIR@"
#define Slicer_INSTALL_INCLUDE_DIR "@Slicer_INSTALL_INCLUDE_DIR@"
#define Slicer_INSTALL_SHARE_DIR "@Slicer_INSTALL_SHARE_DIR@"
#define Slicer_INSTALL_ITKFACTORIES_DIR "@Slicer_INSTALL_ITKFACTORIES_DIR@"
#define Slicer_INSTALL_BIN_DIR "@Slicer_BIN_DIR@"
#define Slicer_INSTALL_LIB_DIR "@Slicer_LIB_DIR@"
#define Slicer_INSTALL_INCLUDE_DIR "@Slicer_INCLUDE_DIR@"
#define Slicer_INSTALL_SHARE_DIR "@Slicer_SHARE_DIR@"
#define Slicer_INSTALL_ITKFACTORIES_DIR "@Slicer_ITKFACTORIES_DIR@"
#define Slicer_INSTALL_PLUGINS_BIN_DIR "@Slicer_INSTALL_PLUGINS_BIN_DIR@"
#define Slicer_INSTALL_PLUGINS_LIB_DIR "@Slicer_INSTALL_PLUGINS_LIB_DIR@"
#define Slicer_INSTALL_PLUGINS_INCLUDE_DIR "@Slicer_INSTALL_PLUGINS_INCLUDE_DIR@"
#define Slicer_INSTALL_PLUGINS_SHARE_DIR "@Slicer_INSTALL_PLUGINS_SHARE_DIR@"
#define Slicer_INSTALL_PLUGINS_CACHE_DIR "@Slicer_INSTALL_PLUGINS_CACHE_DIR@"
#define Slicer_INSTALL_PLUGINS_BIN_DIR "@Slicer_PLUGINS_BIN_DIR@"
#define Slicer_INSTALL_PLUGINS_LIB_DIR "@Slicer_PLUGINS_LIB_DIR@"
#define Slicer_INSTALL_PLUGINS_INCLUDE_DIR "@Slicer_PLUGINS_INCLUDE_DIR@"
#define Slicer_INSTALL_PLUGINS_SHARE_DIR "@Slicer_PLUGINS_SHARE_DIR@"
#define Slicer_INSTALL_PLUGINS_CACHE_DIR "@Slicer_PLUGINS_CACHE_DIR@"
#cmakedefine Slicer_BUILD_QTLOADABLEMODULES
#ifdef Slicer_BUILD_QTLOADABLEMODULES
# define Slicer_INSTALL_QTLOADABLEMODULES_BIN_DIR "@Slicer_INSTALL_QTLOADABLEMODULES_BIN_DIR@"
# define Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR "@Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR@"
# define Slicer_INSTALL_QTLOADABLEMODULES_INCLUDE_DIR "@Slicer_INSTALL_QTLOADABLEMODULES_INCLUDE_DIR@"
# define Slicer_INSTALL_QTLOADABLEMODULES_SHARE_DIR "@Slicer_INSTALL_QTLOADABLEMODULES_SHARE_DIR@"
# define Slicer_INSTALL_QTLOADABLEMODULES_BIN_DIR "@Slicer_QTLOADABLEMODULES_BIN_DIR@"
# define Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR "@Slicer_QTLOADABLEMODULES_LIB_DIR@"
# define Slicer_INSTALL_QTLOADABLEMODULES_INCLUDE_DIR "@Slicer_QTLOADABLEMODULES_INCLUDE_DIR@"
# define Slicer_INSTALL_QTLOADABLEMODULES_SHARE_DIR "@Slicer_QTLOADABLEMODULES_SHARE_DIR@"
#endif //Slicer_BUILD_QTLOADABLEMODULES
#cmakedefine Slicer_BUILD_QTSCRIPTEDMODULES
#ifdef Slicer_BUILD_QTSCRIPTEDMODULES
# define Slicer_INSTALL_QTSCRIPTEDMODULES_BIN_DIR "@Slicer_INSTALL_QTSCRIPTEDMODULES_BIN_DIR@"
# define Slicer_INSTALL_QTSCRIPTEDMODULES_LIB_DIR "@Slicer_INSTALL_QTSCRIPTEDMODULES_LIB_DIR@"
# define Slicer_INSTALL_QTSCRIPTEDMODULES_INCLUDE_DIR "@Slicer_INSTALL_QTSCRIPTEDMODULES_INCLUDE_DIR@"
# define Slicer_INSTALL_QTSCRIPTEDMODULES_SHARE_DIR "@Slicer_INSTALL_QTSCRIPTEDMODULES_SHARE_DIR@"
# define Slicer_INSTALL_QTSCRIPTEDMODULES_BIN_DIR "@Slicer_QTSCRIPTEDMODULES_BIN_DIR@"
# define Slicer_INSTALL_QTSCRIPTEDMODULES_LIB_DIR "@Slicer_QTSCRIPTEDMODULES_LIB_DIR@"
# define Slicer_INSTALL_QTSCRIPTEDMODULES_INCLUDE_DIR "@Slicer_QTSCRIPTEDMODULES_INCLUDE_DIR@"
# define Slicer_INSTALL_QTSCRIPTEDMODULES_SHARE_DIR "@Slicer_QTSCRIPTEDMODULES_SHARE_DIR@"
#endif //Slicer_BUILD_QTSCRIPTEDMODULES
/* Do not use those variables unless you can not retrieve the Tcl/Tk version
......@@ -68,6 +68,12 @@
#define Slicer_INCR_TCL_MAJOR_VERSION "@INCR_TCL_MAJOR_VERSION@"
#define Slicer_INCR_TCL_MINOR_VERSION "@INCR_TCL_MINOR_VERSION@"
#cmakedefine Slicer_USE_PYTHONQT
#ifdef Slicer_USE_PYTHONQT
# define Slicer_PYTHON_VERSION_DOT "@Slicer_PYTHON_VERSION_DOT@"
# define Slicer_PYTHON_VERSION "@Slicer_PYTHON_VERSION@"
#endif //Slicer_PUSE_PYTHONQT
// Library sub-directory
#define VTK_DIR "@VTK_DIR@"
#define CTK_DIR "@CTK_DIR@"
......
Markdown is supported
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