Commit 434b0106 authored by jcfr's avatar jcfr

COMP: Add Slicer_INSTALL_DEVELOPMENT option - By default OFF

For now, this is *just* a regular variable instead of being a CMake Option.
In order to be able to provide a developer package. More work is required.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@16361 3bd1e089-480b-0410-8dfb-8563597acbee
parent 0a3e0e3a
......@@ -56,14 +56,18 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
)
INSTALL(FILES
itkPluginFilterWatcher.h
itkPluginUtilities.h
vtkPluginFilterWatcher.h
vtkSlicerBaseCLIWin32Header.h
${CMAKE_CURRENT_BINARY_DIR}/vtkSlicerBaseCLIConfigure.h
DESTINATION ${Slicer_INSTALL_INCLUDE_DIR}/${PROJECT_NAME} COMPONENT Development
)
# --------------------------------------------------------------------------
# Install headers
# --------------------------------------------------------------------------
IF(NOT DEFINED ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
SET(${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT ON)
ENDIF()
IF(NOT ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
install(
FILES ${headers} ${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
DESTINATION include/${PROJECT_NAME} COMPONENT Development)
ENDIF()
# --------------------------------------------------------------------------
# Sources
......
......@@ -77,12 +77,18 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
)
file(GLOB files "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
install(FILES
${files}
${CMAKE_CURRENT_BINARY_DIR}/vtkSlicerBaseLogicConfigure.h
DESTINATION ${Slicer_INSTALL_INCLUDE_DIR}/${PROJECT_NAME} COMPONENT Development
)
# --------------------------------------------------------------------------
# Install headers
# --------------------------------------------------------------------------
IF(NOT DEFINED ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
SET(${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT ON)
ENDIF()
IF(NOT ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
install(
FILES ${headers} ${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
DESTINATION include/${PROJECT_NAME} COMPONENT Development)
ENDIF()
# --------------------------------------------------------------------------
# Sources
......
......@@ -198,15 +198,20 @@ MACRO(SlicerMacroBuildBaseQtLibrary)
LIBRARY DESTINATION ${Slicer_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${Slicer_INSTALL_LIB_DIR} COMPONENT Development
)
# --------------------------------------------------------------------------
# Install headers
FILE(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
INSTALL(FILES
${headers}
${dynamicHeaders}
DESTINATION ${Slicer_INSTALL_INCLUDE_DIR}/${PROJECT_NAME} COMPONENT Development
)
# --------------------------------------------------------------------------
IF(NOT Slicer_INSTALL_NO_DEVELOPMENT)
# Install headers
FILE(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
INSTALL(FILES
${headers}
${dynamicHeaders}
DESTINATION ${Slicer_INSTALL_INCLUDE_DIR}/${PROJECT_NAME} COMPONENT Development
)
ENDIF()
# --------------------------------------------------------------------------
# PythonQt wrapping
# --------------------------------------------------------------------------
......
......@@ -128,14 +128,28 @@ MACRO(SlicerMacroBuildModuleLogic)
ARCHIVE DESTINATION ${Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR} COMPONENT Development
)
# --------------------------------------------------------------------------
# Install headers
FILE(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
INSTALL(FILES
${headers}
${dynamicHeaders}
DESTINATION ${Slicer_INSTALL_QTLOADABLEMODULES_INCLUDE_DIR}/${MODULELOGIC_NAME} COMPONENT Development
)
# --------------------------------------------------------------------------
IF(DEFINED Slicer_DEVELOPMENT_INSTALL)
IF(NOT DEFINED ${MODULELOGIC_NAME}_DEVELOPMENT_INSTALL)
SET(${MODULELOGIC_NAME}_DEVELOPMENT_INSTALL ${Slicer_DEVELOPMENT_INSTALL})
ENDIF()
ELSE()
IF (NOT DEFINED ${MODULELOGIC_NAME}_DEVELOPMENT_INSTALL)
SET(${MODULELOGIC_NAME}_DEVELOPMENT_INSTALL OFF)
ENDIF()
ENDIF()
IF(${MODULELOGIC_NAME}_DEVELOPMENT_INSTALL)
FILE(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
INSTALL(FILES
${headers}
${dynamicHeaders}
DESTINATION ${Slicer_INSTALL_QTLOADABLEMODULES_INCLUDE_DIR}/${MODULELOGIC_NAME} COMPONENT Development
)
ENDIF()
IF(NOT ${MODULELOGIC_DISABLE_WRAP_PYTHON} AND VTK_WRAP_PYTHON AND BUILD_SHARED_LIBS)
# TODO: A parameter named 'WRAPPED_TARGET_LIBRARIES'
......
......@@ -154,13 +154,28 @@ MACRO(slicerMacroBuildQtModule)
LIBRARY DESTINATION ${Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR} COMPONENT Development
)
# --------------------------------------------------------------------------
# Install headers
FILE(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
INSTALL(FILES
${headers}
${dynamicHeaders}
DESTINATION ${Slicer_INSTALL_QTLOADABLEMODULES_INCLUDE_DIR}/${QTMODULE_NAME} COMPONENT Development
)
# --------------------------------------------------------------------------
IF(DEFINED Slicer_DEVELOPMENT_INSTALL)
IF(NOT DEFINED ${QTMODULE_NAME}_DEVELOPMENT_INSTALL)
SET(${QTMODULE_NAME}_DEVELOPMENT_INSTALL ${Slicer_DEVELOPMENT_INSTALL})
ENDIF()
ELSE()
IF (NOT DEFINED ${QTMODULE_NAME}_DEVELOPMENT_INSTALL)
SET(${QTMODULE_NAME}_DEVELOPMENT_INSTALL OFF)
ENDIF()
ENDIF()
IF(${QTMODULE_NAME}_DEVELOPMENT_INSTALL)
# Install headers
FILE(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
INSTALL(FILES
${headers}
${dynamicHeaders}
DESTINATION ${Slicer_INSTALL_QTLOADABLEMODULES_INCLUDE_DIR}/${QTMODULE_NAME} COMPONENT Development
)
ENDIF()
ENDMACRO()
......@@ -160,6 +160,19 @@ MARK_AS_ADVANCED(Slicer_ITK_GIT_REPOSITORY)
SET(Slicer_ITK_GIT_TAG "origin/slicer-4.0" CACHE STRING "ITK git tag to use")
MARK_AS_ADVANCED(Slicer_ITK_GIT_TAG)
#-----------------------------------------------------------------------------
# Install no development files by default, but allow the user to get
# them installed by setting Slicer_INSTALL_DEVELOPMENT to true.
#-----------------------------------------------------------------------------
#OPTION(Slicer_INSTALL_DEVELOPMENT "Install Slicer extension development files." OFF)
#MARK_AS_ADVANCED(Slicer_INSTALL_DEVELOPMENT)
SET(Slicer_INSTALL_DEVELOPMENT OFF)
IF(NOT Slicer_INSTALL_DEVELOPMENT)
SET(Slicer_INSTALL_NO_DEVELOPMENT 1)
ELSE ()
SET(Slicer_INSTALL_NO_DEVELOPMENT 0)
ENDIF()
#-----------------------------------------------------------------------------
# Documentation
#-----------------------------------------------------------------------------
......@@ -573,11 +586,13 @@ FOREACH(f ${files})
)
ENDFOREACH()
INSTALL(FILES
"${CMAKE_CURRENT_BINARY_DIR}/vtkSlicerConfigure.h"
"${CMAKE_CURRENT_BINARY_DIR}/vtkSlicerVersionConfigure.h"
DESTINATION ${Slicer_INSTALL_INCLUDE_DIR} COMPONENT Development
)
IF(NOT Slicer_INSTALL_NO_DEVELOPMENT)
INSTALL(FILES
"${CMAKE_CURRENT_BINARY_DIR}/vtkSlicerConfigure.h"
"${CMAKE_CURRENT_BINARY_DIR}/vtkSlicerVersionConfigure.h"
DESTINATION ${Slicer_INSTALL_INCLUDE_DIR} COMPONENT Development
)
ENDIF()
#-----------------------------------------------------------------------------
# Set C/CXX Flags
......@@ -621,7 +636,6 @@ INSTALL(FILES
COMPONENT Development
)
#-----------------------------------------------------------------------------
# Includes
#-----------------------------------------------------------------------------
......@@ -690,12 +704,14 @@ ENDIF()
# Install testing data
INSTALL(DIRECTORY
Testing
DESTINATION ${Slicer_INSTALL_SHARE_DIR} COMPONENT Development
PATTERN ".svn" EXCLUDE
PATTERN "CMakeLists.txt" EXCLUDE
)
IF(NOT Slicer_INSTALL_NO_DEVELOPMENT)
INSTALL(DIRECTORY
Testing
DESTINATION ${Slicer_INSTALL_SHARE_DIR} COMPONENT Development
PATTERN ".svn" EXCLUDE
PATTERN "CMakeLists.txt" EXCLUDE
)
ENDIF()
#-----------------------------------------------------------------------------
# Launcher for slicer
......@@ -742,18 +758,20 @@ ADD_SUBDIRECTORY(Utilities/Package)
ADD_SUBDIRECTORY(Utilities/Doxygen)
#FILE(GLOB cmake_files "${CMAKE_CURRENT_SOURCE_DIR}/CMake/*.cmake")
#INSTALL(
# FILES ${cmake_files}
# DESTINATION ${Slicer_INSTALL_LIB_DIR}/CMake COMPONENT Development
# )
#INSTALL(FILES
# ${Slicer_BINARY_DIR}/UseSlicer.cmake
# ${Slicer_BINARY_DIR}/Utilities/SlicerConfig.cmake
# DESTINATION ${Slicer_INSTALL_LIB_DIR}
# COMPONENT Development
# )
IF(NOT Slicer_INSTALL_NO_DEVELOPMENT)
FILE(GLOB cmake_files "${CMAKE_CURRENT_SOURCE_DIR}/CMake/*.cmake")
INSTALL(
FILES ${cmake_files}
DESTINATION ${Slicer_INSTALL_LIB_DIR}/CMake COMPONENT Development
)
INSTALL(FILES
${Slicer_BINARY_DIR}/UseSlicer.cmake
${Slicer_BINARY_DIR}/SlicerConfig.cmake
DESTINATION ${Slicer_INSTALL_LIB_DIR}
COMPONENT Development
)
ENDIF()
#-----------------------------------------------------------------------------
# The commands in this directory are intended to be executed as
......
......@@ -90,5 +90,6 @@ SET(Slicer_Libs_INCLUDE_DIRS ${Slicer_Libs_INCLUDE_DIRS} ${include_dirs} CACHE I
FOREACH(dir ${dirs})
SET(${dir}_INSTALL_BIN_DIR ${Slicer_INSTALL_LIB_DIR})
SET(${dir}_INSTALL_LIB_DIR ${Slicer_INSTALL_LIB_DIR})
SET(${dir}_INSTALL_NO_DEVELOPMENT ${Slicer_INSTALL_NO_DEVELOPMENT})
ADD_SUBDIRECTORY(${dir})
ENDFOREACH()
......@@ -55,12 +55,18 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
)
file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
install(
FILES ${headers}
"${CMAKE_CURRENT_BINARY_DIR}/FreeSurferConfigure.h"
DESTINATION include/${PROJECT_NAME} COMPONENT Development
)
# --------------------------------------------------------------------------
# Install headers
# --------------------------------------------------------------------------
IF(NOT DEFINED ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
SET(${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT ON)
ENDIF()
IF(NOT ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
install(
FILES ${headers} ${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
DESTINATION include/${PROJECT_NAME} COMPONENT Development)
ENDIF()
# --------------------------------------------------------------------------
# Sources
......@@ -161,26 +167,34 @@ install(
# --------------------------------------------------------------------------
# Install Test Data
# --------------------------------------------------------------------------
file(GLOB_RECURSE PNGFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.png")
file(GLOB_RECURSE TCLFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.tcl")
file(GLOB_RECURSE CURVFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.curv")
file(GLOB_RECURSE ORIGFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.orig")
foreach(file
${PNGFILES}
${TCLFILES}
${CURVFILES}
${ORIGFILES}
)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/${file}
${CMAKE_BINARY_DIR}/share/${PROJECT_NAME}/${file}
COPYONLY
IF(NOT DEFINED ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
SET(${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT ON)
ENDIF()
IF(NOT ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
#file(GLOB_RECURSE PNGFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.png")
#file(GLOB_RECURSE TCLFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.tcl")
#file(GLOB_RECURSE CURVFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.curv")
#file(GLOB_RECURSE ORIGFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.orig")
#foreach(file
# ${PNGFILES}
# ${TCLFILES}
# ${CURVFILES}
# ${ORIGFILES}
# )
# configure_file(
# ${CMAKE_CURRENT_SOURCE_DIR}/${file}
# ${CMAKE_BINARY_DIR}/share/${PROJECT_NAME}/${file}
# COPYONLY
# )
#endforeach()
install(DIRECTORY
Testing
DESTINATION share/${PROJECT_NAME} COMPONENT Development
PATTERN "*.cxx" EXCLUDE
PATTERN ".svn" EXCLUDE
PATTERN "*.tcl" EXCLUDE
PATTERN "CMakeLists.txt" EXCLUDE
)
endforeach()
install(DIRECTORY
Testing
DESTINATION share/${PROJECT_NAME} COMPONENT Development
PATTERN ".svn" EXCLUDE
)
ENDIF()
......@@ -60,12 +60,18 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
)
file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
install(FILES
${headers}
"${CMAKE_CURRENT_BINARY_DIR}/vtkIGTConfigure.h"
DESTINATION include/${PROJECT_NAME} COMPONENT Development
)
# --------------------------------------------------------------------------
# Install headers
# --------------------------------------------------------------------------
IF(NOT DEFINED ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
SET(${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT ON)
ENDIF()
IF(NOT ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.(h|txx)")
install(
FILES ${headers} ${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
DESTINATION include/${PROJECT_NAME} COMPONENT Development)
ENDIF()
# --------------------------------------------------------------------------
# Sources
......
......@@ -61,12 +61,18 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
)
file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
install(FILES
${headers}
"${CMAKE_CURRENT_BINARY_DIR}/itkMGHImageIOConfigure.h"
DESTINATION include/${PROJECT_NAME} COMPONENT Development
)
# --------------------------------------------------------------------------
# Install headers
# --------------------------------------------------------------------------
IF(NOT DEFINED ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
SET(${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT ON)
ENDIF()
IF(NOT ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
install(
FILES ${headers} ${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
DESTINATION include/${PROJECT_NAME} COMPONENT Development)
ENDIF()
# --------------------------------------------------------------------------
# Sources
......
......@@ -77,12 +77,18 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
)
file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
install(FILES
${headers}
"${CMAKE_CURRENT_BINARY_DIR}/vtkMRMLConfigure.h"
DESTINATION include/${PROJECT_NAME} COMPONENT Development
)
# --------------------------------------------------------------------------
# Install headers
# --------------------------------------------------------------------------
IF(NOT DEFINED ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
SET(${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT ON)
ENDIF()
IF(NOT ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
install(
FILES ${headers} ${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
DESTINATION include/${PROJECT_NAME} COMPONENT Development)
ENDIF()
# --------------------------------------------------------------------------
# Sources
......@@ -285,32 +291,41 @@ endif()
# --------------------------------------------------------------------------
# Install Test Data
# --------------------------------------------------------------------------
file(GLOB_RECURSE MRMLFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.mrml")
file(GLOB_RECURSE TCLFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.tcl")
file(GLOB_RECURSE XMLFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.xml")
file(GLOB_RECURSE GZFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.gz")
file(GLOB_RECURSE NHDRFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.nhdr")
file(GLOB_RECURSE NRRDFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.nrrd")
file(GLOB_RECURSE VTKFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.vtk")
IF(NOT DEFINED ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
SET(${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT ON)
ENDIF()
IF(NOT ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
#file(GLOB_RECURSE MRMLFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.mrml")
#file(GLOB_RECURSE TCLFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.tcl")
#file(GLOB_RECURSE XMLFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.xml")
#file(GLOB_RECURSE GZFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.gz")
#file(GLOB_RECURSE NHDRFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.nhdr")
#file(GLOB_RECURSE NRRDFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.nrrd")
#file(GLOB_RECURSE VTKFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.vtk")
foreach(file
${MRMLFILES}
${TCLFILES}
${XMLFILES}
${GZFILES}
${NHDRFILES}
${NRRDFILES}
${VTKFILES}
)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/${file}
${CMAKE_BINARY_DIR}/share/${PROJECT_NAME}/${file}
COPYONLY
)
endforeach()
#foreach(file
# ${MRMLFILES}
# ${TCLFILES}
# ${XMLFILES}
# ${GZFILES}
# ${NHDRFILES}
# ${NRRDFILES}
# ${VTKFILES}
# )
# message(file:${file})
# configure_file(
# ${CMAKE_CURRENT_SOURCE_DIR}/${file}
# ${CMAKE_BINARY_DIR}/share/${PROJECT_NAME}/${file}
# COPYONLY
# )
#endforeach()
install(DIRECTORY
Testing
DESTINATION share/${PROJECT_NAME} COMPONENT Development
PATTERN ".svn" EXCLUDE
)
install(DIRECTORY
Testing
DESTINATION share/${PROJECT_NAME} COMPONENT Development
PATTERN "*.cxx" EXCLUDE
PATTERN ".svn" EXCLUDE
PATTERN "*.tcl" EXCLUDE
PATTERN "CMakeLists.txt" EXCLUDE
)
ENDIF()
......@@ -52,12 +52,18 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
)
FILE(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
INSTALL(FILES
${headers}
"${CMAKE_CURRENT_BINARY_DIR}/vtkMRMLCLIConfigure.h"
DESTINATION include/${PROJECT_NAME} COMPONENT Development
)
# --------------------------------------------------------------------------
# Install headers
# --------------------------------------------------------------------------
IF(NOT DEFINED ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
SET(${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT ON)
ENDIF()
IF(NOT ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
install(
FILES ${headers} ${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
DESTINATION include/${PROJECT_NAME} COMPONENT Development)
ENDIF()
# --------------------------------------------------------------------------
# Sources
......
......@@ -57,12 +57,18 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
)
FILE(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
INSTALL(FILES
${headers}
"${CMAKE_CURRENT_BINARY_DIR}/vtkMRMLDisplayableManagerConfigure.h"
DESTINATION include/${PROJECT_NAME} COMPONENT Development
)
# --------------------------------------------------------------------------
# Install headers
# --------------------------------------------------------------------------
IF(NOT DEFINED ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
SET(${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT ON)
ENDIF()
IF(NOT ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
install(
FILES ${headers} ${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
DESTINATION include/${PROJECT_NAME} COMPONENT Development)
ENDIF()
# --------------------------------------------------------------------------
# Sources
......
......@@ -60,11 +60,18 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
)
file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
install(FILES
${headers} "${CMAKE_CURRENT_BINARY_DIR}/itkMRMLIDImageIOConfigure.h"
DESTINATION include/${PROJECT_NAME} COMPONENT Development
)
# --------------------------------------------------------------------------
# Install headers
# --------------------------------------------------------------------------
IF(NOT DEFINED ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
SET(${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT ON)
ENDIF()
IF(NOT ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
install(
FILES ${headers} ${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
DESTINATION include/${PROJECT_NAME} COMPONENT Development)
ENDIF()
# --------------------------------------------------------------------------
# Sources
......
......@@ -52,12 +52,18 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
)
FILE(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
INSTALL(FILES
${headers}
"${CMAKE_CURRENT_BINARY_DIR}/vtkMRMLLogicConfigure.h"
DESTINATION include/${PROJECT_NAME} COMPONENT Development
)
# --------------------------------------------------------------------------
# Install headers
# --------------------------------------------------------------------------
IF(NOT DEFINED ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
SET(${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT ON)
ENDIF()
IF(NOT ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
install(
FILES ${headers} ${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
DESTINATION include/${PROJECT_NAME} COMPONENT Development)
ENDIF()
# --------------------------------------------------------------------------
# Sources
......
......@@ -73,12 +73,18 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
)
file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
install(FILES
${headers}
"${CMAKE_CURRENT_BINARY_DIR}/vtkRemoteIOConfigure.h"
DESTINATION include/${PROJECT_NAME} COMPONENT Development
)
# --------------------------------------------------------------------------
# Install headers
# --------------------------------------------------------------------------
IF(NOT DEFINED ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
SET(${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT ON)
ENDIF()
IF(NOT ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
install(
FILES ${headers} ${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
DESTINATION include/${PROJECT_NAME} COMPONENT Development)
ENDIF()
# --------------------------------------------------------------------------
# Sources
......
......@@ -4,18 +4,34 @@ PROJECT(SlicerExecutionModel)
cmake_minimum_required(VERSION 2.8.2)
#-----------------------------------------------------------------------------
IF(DEFINED SlicerExecutionModel_INSTALL_BIN_DIR)
SET(GenerateCLP_INSTALL_BIN_DIR ${SlicerExecutionModel_INSTALL_BIN_DIR})
SET(ModuleDescriptionParser_INSTALL_BIN_DIR ${SlicerExecutionModel_INSTALL_BIN_DIR})
SET(tclap_INSTALL_BIN_DIR ${SlicerExecutionModel_INSTALL_BIN_DIR})
ENDIF()
IF(DEFINED SlicerExecutionModel_INSTALL_LIB_DIR)
SET(GenerateCLP_INSTALL_LIB_DIR ${SlicerExecutionModel_INSTALL_LIB_DIR})
SET(ModuleDescriptionParser_INSTALL_LIB_DIR ${SlicerExecutionModel_INSTALL_LIB_DIR})
SET(tclap_INSTALL_LIB_DIR ${SlicerExecutionModel_INSTALL_LIB_DIR})
ENDIF()
##NOTE: Only build these items if they have not already been identified.
## This allows for these items to be skipped if building against Slicer versions
IF(DEFINED SlicerExecutionModel_INSTALL_NO_DEVELOPMENT)
SET(GenerateCLP_INSTALL_NO_DEVELOPMENT ${SlicerExecutionModel_INSTALL_NO_DEVELOPMENT})
SET(ModuleDescriptionParser_INSTALL_NO_DEVELOPMENT ${SlicerExecutionModel_INSTALL_NO_DEVELOPMENT})
SET(tclap_INSTALL_NO_DEVELOPMENT ${SlicerExecutionModel_INSTALL_NO_DEVELOPMENT})
ENDIF()
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})
# --------------------------------------------------------------------------
# SETIFEMPTY
# --------------------------------------------------------------------------
## A simple macro to set variables ONLY if it has not been set
## This is needed when stand-alone packages are combined into
## a larger package, and the desired behavior is that all the
## binary results end up in the combined directory.
## The signature has the same signature as the set, it just checks if the value is already set before executing.
## The signature has the same signature as the set, it just checks if the
## value is already set before executing.
if(NOT SETIFEMPTY)
macro(SETIFEMPTY)
set(KEY ${ARGV0})
......@@ -23,22 +39,10 @@ macro(SETIFEMPTY)
if(NOT ${KEY})
set(${ARGV})
endif(NOT ${KEY})
endmacro(SETIFEMPTY KEY VALUE)
endmacro()
endif(NOT SETIFEMPTY)
###
IF(DEFINED SlicerExecutionModel_INSTALL_BIN_DIR)
SET(GenerateCLP_INSTALL_BIN_DIR ${SlicerExecutionModel_INSTALL_BIN_DIR})
SET(ModuleDescriptionParser_INSTALL_BIN_DIR ${SlicerExecutionModel_INSTALL_BIN_DIR})
SET(tclap_INSTALL_BIN_DIR ${SlicerExecutionModel_INSTALL_BIN_DIR})
ENDIF()
IF(DEFINED SlicerExecutionModel_INSTALL_LIB_DIR)
SET(GenerateCLP_INSTALL_LIB_DIR ${SlicerExecutionModel_INSTALL_LIB_DIR})
SET(ModuleDescriptionParser_INSTALL_LIB_DIR ${SlicerExecutionModel_INSTALL_LIB_DIR})
SET(tclap_INSTALL_LIB_DIR ${SlicerExecutionModel_INSTALL_LIB_DIR})
ENDIF()
SETIFEMPTY(TCLAP_DIR ${CMAKE_CURRENT_BINARY_DIR}/tclap CACHE PATH "Location of TCLAPConfig.cmake" FORCE)
ADD_SUBDIRECTORY(tclap)
......
......@@ -73,20 +73,30 @@ include(GenerateGenerateCLPConfig.cmake)
if(NOT DEFINED GenerateCLP_INSTALL_BIN_DIR)
SET(GenerateCLP_INSTALL_BIN_DIR bin)
endif()
install(TARGETS GenerateCLP RUNTIME
DESTINATION ${GenerateCLP_INSTALL_BIN_DIR} COMPONENT 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
COMPONENT Development
RENAME UseGenerateCLP.cmake
)
IF(NOT DEFINED ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
SET(${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT ON)
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
COMPONENT Development
RENAME UseGenerateCLP.cmake
)
ENDIF()
# --------------------------------------------------------------------------
# Launcher
......@@ -122,9 +132,14 @@ if(NOT WIN32)
${CMAKE_CURRENT_BINARY_DIR}/GenerateCLPLauncher.c)
add_dependencies(GenerateCLPLauncher GenerateCLP)
install(TARGETS GenerateCLPLauncher RUNTIME
DESTINATION bin COMPONENT Development
)
# --------------------------------------------------------------------------