Commit 434b0106 authored by jcfr's avatar jcfr
Browse files

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( ...@@ -56,14 +56,18 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file} ${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
) )
INSTALL(FILES # --------------------------------------------------------------------------
itkPluginFilterWatcher.h # Install headers
itkPluginUtilities.h # --------------------------------------------------------------------------
vtkPluginFilterWatcher.h IF(NOT DEFINED ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
vtkSlicerBaseCLIWin32Header.h SET(${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT ON)
${CMAKE_CURRENT_BINARY_DIR}/vtkSlicerBaseCLIConfigure.h ENDIF()
DESTINATION ${Slicer_INSTALL_INCLUDE_DIR}/${PROJECT_NAME} COMPONENT Development 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 # Sources
......
...@@ -77,12 +77,18 @@ configure_file( ...@@ -77,12 +77,18 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file} ${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
) )
file(GLOB files "${CMAKE_CURRENT_SOURCE_DIR}/*.h") # --------------------------------------------------------------------------
install(FILES # Install headers
${files} # --------------------------------------------------------------------------
${CMAKE_CURRENT_BINARY_DIR}/vtkSlicerBaseLogicConfigure.h IF(NOT DEFINED ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
DESTINATION ${Slicer_INSTALL_INCLUDE_DIR}/${PROJECT_NAME} COMPONENT 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 # Sources
......
...@@ -198,15 +198,20 @@ MACRO(SlicerMacroBuildBaseQtLibrary) ...@@ -198,15 +198,20 @@ MACRO(SlicerMacroBuildBaseQtLibrary)
LIBRARY DESTINATION ${Slicer_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries LIBRARY DESTINATION ${Slicer_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${Slicer_INSTALL_LIB_DIR} COMPONENT Development ARCHIVE DESTINATION ${Slicer_INSTALL_LIB_DIR} COMPONENT Development
) )
# --------------------------------------------------------------------------
# Install headers # Install headers
FILE(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h") # --------------------------------------------------------------------------
INSTALL(FILES IF(NOT Slicer_INSTALL_NO_DEVELOPMENT)
${headers} # Install headers
${dynamicHeaders} FILE(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
DESTINATION ${Slicer_INSTALL_INCLUDE_DIR}/${PROJECT_NAME} COMPONENT Development INSTALL(FILES
) ${headers}
${dynamicHeaders}
DESTINATION ${Slicer_INSTALL_INCLUDE_DIR}/${PROJECT_NAME} COMPONENT Development
)
ENDIF()
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
# PythonQt wrapping # PythonQt wrapping
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
......
...@@ -128,14 +128,28 @@ MACRO(SlicerMacroBuildModuleLogic) ...@@ -128,14 +128,28 @@ MACRO(SlicerMacroBuildModuleLogic)
ARCHIVE DESTINATION ${Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR} COMPONENT Development ARCHIVE DESTINATION ${Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR} COMPONENT Development
) )
# --------------------------------------------------------------------------
# Install headers # Install headers
FILE(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h") # --------------------------------------------------------------------------
INSTALL(FILES IF(DEFINED Slicer_DEVELOPMENT_INSTALL)
${headers} IF(NOT DEFINED ${MODULELOGIC_NAME}_DEVELOPMENT_INSTALL)
${dynamicHeaders} SET(${MODULELOGIC_NAME}_DEVELOPMENT_INSTALL ${Slicer_DEVELOPMENT_INSTALL})
DESTINATION ${Slicer_INSTALL_QTLOADABLEMODULES_INCLUDE_DIR}/${MODULELOGIC_NAME} COMPONENT Development 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) IF(NOT ${MODULELOGIC_DISABLE_WRAP_PYTHON} AND VTK_WRAP_PYTHON AND BUILD_SHARED_LIBS)
# TODO: A parameter named 'WRAPPED_TARGET_LIBRARIES' # TODO: A parameter named 'WRAPPED_TARGET_LIBRARIES'
......
...@@ -154,13 +154,28 @@ MACRO(slicerMacroBuildQtModule) ...@@ -154,13 +154,28 @@ MACRO(slicerMacroBuildQtModule)
LIBRARY DESTINATION ${Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR} COMPONENT RuntimeLibraries LIBRARY DESTINATION ${Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR} COMPONENT Development ARCHIVE DESTINATION ${Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR} COMPONENT Development
) )
# --------------------------------------------------------------------------
# Install headers # Install headers
FILE(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h") # --------------------------------------------------------------------------
INSTALL(FILES IF(DEFINED Slicer_DEVELOPMENT_INSTALL)
${headers} IF(NOT DEFINED ${QTMODULE_NAME}_DEVELOPMENT_INSTALL)
${dynamicHeaders} SET(${QTMODULE_NAME}_DEVELOPMENT_INSTALL ${Slicer_DEVELOPMENT_INSTALL})
DESTINATION ${Slicer_INSTALL_QTLOADABLEMODULES_INCLUDE_DIR}/${QTMODULE_NAME} COMPONENT Development 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() ENDMACRO()
...@@ -160,6 +160,19 @@ MARK_AS_ADVANCED(Slicer_ITK_GIT_REPOSITORY) ...@@ -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") SET(Slicer_ITK_GIT_TAG "origin/slicer-4.0" CACHE STRING "ITK git tag to use")
MARK_AS_ADVANCED(Slicer_ITK_GIT_TAG) 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 # Documentation
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
...@@ -573,11 +586,13 @@ FOREACH(f ${files}) ...@@ -573,11 +586,13 @@ FOREACH(f ${files})
) )
ENDFOREACH() ENDFOREACH()
INSTALL(FILES IF(NOT Slicer_INSTALL_NO_DEVELOPMENT)
"${CMAKE_CURRENT_BINARY_DIR}/vtkSlicerConfigure.h" INSTALL(FILES
"${CMAKE_CURRENT_BINARY_DIR}/vtkSlicerVersionConfigure.h" "${CMAKE_CURRENT_BINARY_DIR}/vtkSlicerConfigure.h"
DESTINATION ${Slicer_INSTALL_INCLUDE_DIR} COMPONENT Development "${CMAKE_CURRENT_BINARY_DIR}/vtkSlicerVersionConfigure.h"
) DESTINATION ${Slicer_INSTALL_INCLUDE_DIR} COMPONENT Development
)
ENDIF()
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Set C/CXX Flags # Set C/CXX Flags
...@@ -621,7 +636,6 @@ INSTALL(FILES ...@@ -621,7 +636,6 @@ INSTALL(FILES
COMPONENT Development COMPONENT Development
) )
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Includes # Includes
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
...@@ -690,12 +704,14 @@ ENDIF() ...@@ -690,12 +704,14 @@ ENDIF()
# Install testing data # Install testing data
INSTALL(DIRECTORY IF(NOT Slicer_INSTALL_NO_DEVELOPMENT)
Testing INSTALL(DIRECTORY
DESTINATION ${Slicer_INSTALL_SHARE_DIR} COMPONENT Development Testing
PATTERN ".svn" EXCLUDE DESTINATION ${Slicer_INSTALL_SHARE_DIR} COMPONENT Development
PATTERN "CMakeLists.txt" EXCLUDE PATTERN ".svn" EXCLUDE
) PATTERN "CMakeLists.txt" EXCLUDE
)
ENDIF()
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Launcher for slicer # Launcher for slicer
...@@ -742,18 +758,20 @@ ADD_SUBDIRECTORY(Utilities/Package) ...@@ -742,18 +758,20 @@ ADD_SUBDIRECTORY(Utilities/Package)
ADD_SUBDIRECTORY(Utilities/Doxygen) ADD_SUBDIRECTORY(Utilities/Doxygen)
#FILE(GLOB cmake_files "${CMAKE_CURRENT_SOURCE_DIR}/CMake/*.cmake") IF(NOT Slicer_INSTALL_NO_DEVELOPMENT)
#INSTALL( FILE(GLOB cmake_files "${CMAKE_CURRENT_SOURCE_DIR}/CMake/*.cmake")
# FILES ${cmake_files} INSTALL(
# DESTINATION ${Slicer_INSTALL_LIB_DIR}/CMake COMPONENT Development FILES ${cmake_files}
# ) DESTINATION ${Slicer_INSTALL_LIB_DIR}/CMake COMPONENT Development
)
#INSTALL(FILES
# ${Slicer_BINARY_DIR}/UseSlicer.cmake INSTALL(FILES
# ${Slicer_BINARY_DIR}/Utilities/SlicerConfig.cmake ${Slicer_BINARY_DIR}/UseSlicer.cmake
# DESTINATION ${Slicer_INSTALL_LIB_DIR} ${Slicer_BINARY_DIR}/SlicerConfig.cmake
# COMPONENT Development DESTINATION ${Slicer_INSTALL_LIB_DIR}
# ) COMPONENT Development
)
ENDIF()
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# The commands in this directory are intended to be executed as # 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 ...@@ -90,5 +90,6 @@ SET(Slicer_Libs_INCLUDE_DIRS ${Slicer_Libs_INCLUDE_DIRS} ${include_dirs} CACHE I
FOREACH(dir ${dirs}) FOREACH(dir ${dirs})
SET(${dir}_INSTALL_BIN_DIR ${Slicer_INSTALL_LIB_DIR}) SET(${dir}_INSTALL_BIN_DIR ${Slicer_INSTALL_LIB_DIR})
SET(${dir}_INSTALL_LIB_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}) ADD_SUBDIRECTORY(${dir})
ENDFOREACH() ENDFOREACH()
...@@ -55,12 +55,18 @@ configure_file( ...@@ -55,12 +55,18 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file} ${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
) )
file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h") # --------------------------------------------------------------------------
install( # Install headers
FILES ${headers} # --------------------------------------------------------------------------
"${CMAKE_CURRENT_BINARY_DIR}/FreeSurferConfigure.h" IF(NOT DEFINED ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
DESTINATION include/${PROJECT_NAME} COMPONENT 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 # Sources
...@@ -161,26 +167,34 @@ install( ...@@ -161,26 +167,34 @@ install(
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
# Install Test Data # Install Test Data
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
file(GLOB_RECURSE PNGFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.png") IF(NOT DEFINED ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
file(GLOB_RECURSE TCLFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.tcl") SET(${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT ON)
file(GLOB_RECURSE CURVFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.curv") ENDIF()
file(GLOB_RECURSE ORIGFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.orig") IF(NOT ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
#file(GLOB_RECURSE PNGFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.png")
foreach(file #file(GLOB_RECURSE TCLFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.tcl")
${PNGFILES} #file(GLOB_RECURSE CURVFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.curv")
${TCLFILES} #file(GLOB_RECURSE ORIGFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.orig")
${CURVFILES}
${ORIGFILES} #foreach(file
) # ${PNGFILES}
configure_file( # ${TCLFILES}
${CMAKE_CURRENT_SOURCE_DIR}/${file} # ${CURVFILES}
${CMAKE_BINARY_DIR}/share/${PROJECT_NAME}/${file} # ${ORIGFILES}
COPYONLY # )
# 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() ENDIF()
install(DIRECTORY
Testing
DESTINATION share/${PROJECT_NAME} COMPONENT Development
PATTERN ".svn" EXCLUDE
)
...@@ -60,12 +60,18 @@ configure_file( ...@@ -60,12 +60,18 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file} ${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
) )
file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h") # --------------------------------------------------------------------------
install(FILES # Install headers
${headers} # --------------------------------------------------------------------------
"${CMAKE_CURRENT_BINARY_DIR}/vtkIGTConfigure.h" IF(NOT DEFINED ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
DESTINATION include/${PROJECT_NAME} COMPONENT 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 # Sources
......
...@@ -61,12 +61,18 @@ configure_file( ...@@ -61,12 +61,18 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file} ${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
) )
file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h") # --------------------------------------------------------------------------
install(FILES # Install headers
${headers} # --------------------------------------------------------------------------
"${CMAKE_CURRENT_BINARY_DIR}/itkMGHImageIOConfigure.h" IF(NOT DEFINED ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
DESTINATION include/${PROJECT_NAME} COMPONENT 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 # Sources
......
...@@ -77,12 +77,18 @@ configure_file( ...@@ -77,12 +77,18 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file} ${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
) )
file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h") # --------------------------------------------------------------------------
install(FILES # Install headers
${headers} # --------------------------------------------------------------------------
"${CMAKE_CURRENT_BINARY_DIR}/vtkMRMLConfigure.h" IF(NOT DEFINED ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
DESTINATION include/${PROJECT_NAME} COMPONENT 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 # Sources
...@@ -285,32 +291,41 @@ endif() ...@@ -285,32 +291,41 @@ endif()
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
# Install Test Data # Install Test Data
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
file(GLOB_RECURSE MRMLFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.mrml") IF(NOT DEFINED ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
file(GLOB_RECURSE TCLFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.tcl") SET(${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT ON)
file(GLOB_RECURSE XMLFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.xml") ENDIF()
file(GLOB_RECURSE GZFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.gz") IF(NOT ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
file(GLOB_RECURSE NHDRFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.nhdr") #file(GLOB_RECURSE MRMLFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.mrml")
file(GLOB_RECURSE NRRDFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.nrrd") #file(GLOB_RECURSE TCLFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.tcl")
file(GLOB_RECURSE VTKFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Testing/*.vtk") #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 #foreach(file
${MRMLFILES} # ${MRMLFILES}
${TCLFILES} # ${TCLFILES}
${XMLFILES} # ${XMLFILES}
${GZFILES} # ${GZFILES}
${NHDRFILES} # ${NHDRFILES}
${NRRDFILES} # ${NRRDFILES}
${VTKFILES} # ${VTKFILES}
) # )
configure_file( # message(file:${file})
${CMAKE_CURRENT_SOURCE_DIR}/${file} # configure_file(
${CMAKE_BINARY_DIR}/share/${PROJECT_NAME}/${file} # ${CMAKE_CURRENT_SOURCE_DIR}/${file}
COPYONLY # ${CMAKE_BINARY_DIR}/share/${PROJECT_NAME}/${file}
) # COPYONLY
endforeach() # )
#endforeach()
install(DIRECTORY install(DIRECTORY
Testing Testing
DESTINATION share/${PROJECT_NAME} COMPONENT Development DESTINATION share/${PROJECT_NAME} COMPONENT Development
PATTERN ".svn" EXCLUDE PATTERN "*.cxx" EXCLUDE
) PATTERN ".svn" EXCLUDE
PATTERN "*.tcl" EXCLUDE
PATTERN "CMakeLists.txt" EXCLUDE
)
ENDIF()
...@@ -52,12 +52,18 @@ configure_file( ...@@ -52,12 +52,18 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file} ${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
) )
FILE(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h") # --------------------------------------------------------------------------
INSTALL(FILES # Install headers
${headers} # --------------------------------------------------------------------------
"${CMAKE_CURRENT_BINARY_DIR}/vtkMRMLCLIConfigure.h" IF(NOT DEFINED ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
DESTINATION include/${PROJECT_NAME} COMPONENT 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 # Sources
......
...@@ -57,12 +57,18 @@ configure_file( ...@@ -57,12 +57,18 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file} ${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
) )
FILE(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h") # --------------------------------------------------------------------------
INSTALL(FILES # Install headers
${headers} # --------------------------------------------------------------------------
"${CMAKE_CURRENT_BINARY_DIR}/vtkMRMLDisplayableManagerConfigure.h" IF(NOT DEFINED ${PROJECT_NAME}_INSTALL_NO_DEVELOPMENT)
DESTINATION include/${PROJECT_NAME} COMPONENT 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 # Sources
......
...@@ -60,11 +60,18 @@ configure_file( ...@@ -60,11 +60,18 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file} ${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
) )
file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h") # --------------------------------------------------------------------------