Commit 586f1389 authored by barre's avatar barre
Browse files

ENH: Slicer3 Spring Installation Clean Up

git-svn-id: http://svn.slicer.org/Slicer4/trunk@6777 3bd1e089-480b-0410-8dfb-8563597acbee
parent b95254c0
project(Slicer3)
cmake_minimum_required(VERSION 2.2)
cmake_minimum_required(VERSION 2.6)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
mark_as_advanced(CMAKE_BACKWARDS_COMPATIBILITY)
#-----------------------------------------------------------------------------
#
set(Slicer3_INSTALL_BIN_DIR "bin")
set(Slicer3_INSTALL_LIB_DIR "lib/Slicer3")
set(Slicer3_INSTALL_INCLUDE_DIR "include/Slicer3")
set(Slicer3_INSTALL_SHARE_DIR "share/Slicer3")
set(Slicer3_INSTALL_ITKFACTORIES_DIR "${Slicer3_INSTALL_LIB_DIR}/ITKFactories")
set(Slicer3_INSTALL_PLUGINS_BIN_DIR "${Slicer3_INSTALL_LIB_DIR}/Plugins")
set(Slicer3_INSTALL_PLUGINS_LIB_DIR "${Slicer3_INSTALL_LIB_DIR}/Plugins")
set(Slicer3_INSTALL_PLUGINS_INCLUDE_DIR "${Slicer3_INSTALL_INCLUDE_DIR}/Plugins")
set(Slicer3_INSTALL_PLUGINS_SHARE_DIR "${Slicer3_INSTALL_SHARE_DIR}/Plugins")
set(Slicer3_INSTALL_PLUGINS_CACHE_DIR "${Slicer3_INSTALL_LIB_DIR}/PluginsCache")
set(Slicer3_INSTALL_MODULES_BIN_DIR "${Slicer3_INSTALL_LIB_DIR}/Modules")
set(Slicer3_INSTALL_MODULES_LIB_DIR "${Slicer3_INSTALL_LIB_DIR}/Modules")
set(Slicer3_INSTALL_MODULES_INCLUDE_DIR "${Slicer3_INSTALL_INCLUDE_DIR}/Modules")
set(Slicer3_INSTALL_MODULES_SHARE_DIR "${Slicer3_INSTALL_SHARE_DIR}/Modules")
set(Slicer3_HOME "${Slicer3_BINARY_DIR}")
#-----------------------------------------------------------------------------
# Disable the warnings that DevStudio 2005 emits wrt to sprintf, strcpu, etc.
#
if(CMAKE_COMPILER_2005)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
endif(CMAKE_COMPILER_2005)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
# include a test for endianness (used to be done by default)
#
include(${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
test_big_endian(CMAKE_WORDS_BIGENDIAN)
#-----------------------------------------------------------------------------
# avoid linker bug in Mac OS 10.5
# see:
# http://wiki.finkproject.org/index.php/Fink:Packaging:Preparing_for_10.5#OpenGL_Bug
......@@ -25,6 +51,7 @@ endif(APPLE)
#-----------------------------------------------------------------------------
# Slicer version number.
#
set(Slicer3_VERSION_MAJOR "3")
set(Slicer3_VERSION_MINOR "0")
if(NOT Slicer3_VERSION_PATCH)
......@@ -35,59 +62,53 @@ set(Slicer3_VERSION_FULL "${Slicer3_VERSION}.${Slicer3_VERSION_PATCH}")
#-----------------------------------------------------------------------------
# Build shared lib by default
#
option(BUILD_SHARED_LIBS "Build Slicer3 with shared libraries." ON)
if(BUILD_SHARED_LIBS)
if(WIN32 AND NOT UNIX)
set(SLICER3_LIB_INSTALL_DIR /bin)
else(WIN32 AND NOT UNIX)
set(SLICER3_LIB_INSTALL_DIR /lib)
endif(WIN32 AND NOT UNIX)
endif(BUILD_SHARED_LIBS)
# Temporary hack to set/get persistent values accross subdirs until 2.6 comes
# Neither set_source_file_properties nor set(... INTERNAL FORCE) would work
macro(SET_PERSISTENT_PROPERTY property_name)
set(_file "${Slicer3_BINARY_DIR}/persistent/${property_name}")
file(WRITE "${_file}" "${ARGN}")
#set(__${property_name} ${value} CACHE INTERNAL "" FORCE)
endmacro(SET_PERSISTENT_PROPERTY property_name value)
macro(GET_PERSISTENT_PROPERTY property_name var_name)
set(_file "${Slicer3_BINARY_DIR}/persistent/${property_name}")
if(EXISTS "${_file}")
file(READ "${_file}" ${var_name})
else(EXISTS "${_file}")
set(${var_name})
endif(EXISTS "${_file}")
#set(${var_name} ${__${property_name}})
endmacro(GET_PERSISTENT_PROPERTY property_name var_name)
#
# Top level slicer3 configurations
#-----------------------------------------------------------------------------
# Slicer3 macros
#
set(Slicer3_CMAKE_DIR "${Slicer3_SOURCE_DIR}/CMake" CACHE INTERNAL "")
add_subdirectory(CMake)
# Make sure VTK_CMAKE_DIR is at the beginning so that VTK's FindTCL is
# used before CMake's FindTCL.
set(CMAKE_MODULE_PATH "${VTK_CMAKE_DIR}" ${CMAKE_MODULE_PATH} "${Slicer3_CMAKE_DIR}")
set(LIBRARY_OUTPUT_PATH ${Slicer3_BINARY_DIR}/bin/
CACHE PATH
"Single output directory for building all libraries."
FORCE)
set(EXECUTABLE_OUTPUT_PATH ${Slicer3_BINARY_DIR}/bin/
include("${Slicer3_CMAKE_DIR}/Slicer3PersistenceMacros.cmake")
include("${Slicer3_CMAKE_DIR}/Slicer3PluginsMacros.cmake")
include("${Slicer3_CMAKE_DIR}/Slicer3ModulesMacros.cmake")
CACHE PATH
"Single output directory for building all executables."
FORCE)
#-----------------------------------------------------------------------------
# Top level slicer3 configurations
#
# Slicer libraries subdirectory
set(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
mark_as_advanced(
LIBRARY_OUTPUT_PATH
EXECUTABLE_OUTPUT_PATH
)
# Do NOT force into the cache, as plugins need to override locally and scoping
# becomes an issue.
#set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin/
# CACHE PATH "Single output directory for building all libraries." FORCE)
#set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin/
# CACHE PATH "Single output directory for building all executables." FORCE)
#-----------------------------------------------------------------------------
# Slicer include and libraries subdirectory
#
set(SLICER_INSTALL_LIBRARIES_DIR "lib/Slicer3")
set(SLICER_LIBRARIES_DIR
"${Slicer3_BINARY_DIR}/${SLICER_INSTALL_LIBRARIES_DIR}")
slicer3_set_persistent_property(Slicer3_Libs_LIBRARIES "")
slicer3_set_persistent_property(Slicer3_Base_LIBRARIES "")
slicer3_set_persistent_property(Slicer3_Modules_LIBRARIES "")
SET_PERSISTENT_PROPERTY(Slicer3_LIBRARIES "")
SET_PERSISTENT_PROPERTY(Slicer3_INCLUDE_DIRS "")
slicer3_set_persistent_property(Slicer3_Libs_INCLUDE_DIRS "")
slicer3_set_persistent_property(Slicer3_Base_INCLUDE_DIRS "")
slicer3_set_persistent_property(Slicer3_Modules_INCLUDE_DIRS "")
#-----------------------------------------------------------------------------
# Add the testing directories
#
option(BUILD_TESTING "Test the project" ON)
set(Slicer3_BUILD_TESTING ${BUILD_TESTING})
set(LAUNCH_EXE ${Slicer3_BINARY_DIR}/Slicer3 --launch)
......@@ -97,67 +118,52 @@ if(Slicer3_BUILD_TESTING)
mark_as_advanced(TCL_TCLSH DART_ROOT)
endif(Slicer3_BUILD_TESTING)
#
#-----------------------------------------------------------------------------
# Libs
# - ITK
# - KWWidgets (pulls in VTK)
#
## Python
option(USE_PYTHON "Integrate a python interpreter into Slicer." OFF)
if(USE_PYTHON)
option(Slicer3_USE_PYTHON "Integrate a python interpreter into Slicer." OFF)
if(Slicer3_USE_PYTHON)
find_package(PythonLibs)
add_definitions(-DUSE_PYTHON)
endif(USE_PYTHON)
endif(Slicer3_USE_PYTHON)
## ITK
find_package(ITK REQUIRED)
if(NOT ITK_FOUND)
message(FATAL_ERROR "Need ITK to build")
endif(NOT ITK_FOUND)
include(${ITK_USE_FILE})
#
## KWWidgets
#
find_package(KWWidgets REQUIRED)
if(NOT KWWidgets_FOUND)
message(FATAL_ERROR "Need KWWidgets to build")
endif(NOT KWWidgets_FOUND)
include(${KWWidgets_USE_FILE})
#
# Teem
#
## Teem
find_package(TEEM REQUIRED)
if(NOT TEEM_FOUND)
message(FATAL_ERROR "Need TEEMK to build")
endif(NOT TEEM_FOUND)
include(${TEEM_USE_FILE})
#
# BatchMake
#
option(USE_BatchMake "Build Slicer3 with BatchMake support." OFF)
if(USE_BatchMake)
## BatchMake
option(Slicer3_USE_BatchMake "Build Slicer3 with BatchMake support." OFF)
if(Slicer3_USE_BatchMake)
find_package(BatchMake REQUIRED)
include(${BatchMake_USE_FILE})
endif(USE_BatchMake)
endif(Slicer3_USE_BatchMake)
#
# MIDAS
#
option(USE_MIDAS "Build Slicer3 with MIDAS support." OFF)
#
# NaviTrack
#
option(USE_NAVITRACK "Build Slicer3 with NaviTrack support." OFF)
if(USE_NAVITRACK)
## MIDAS
option(Slicer3_USE_MIDAS "Build Slicer3 with MIDAS support." OFF)
## NaviTrack
option(Slicer3_USE_NAVITRACK "Build Slicer3 with NaviTrack support." OFF)
if(Slicer3_USE_NAVITRACK)
find_library(NAVITRACK_LIB
NAMES NaviTrack
PATHS ${NAVITRACK_LIB_DIR}
......@@ -165,55 +171,59 @@ if(USE_NAVITRACK)
if(NAVITRACK_LIB-NOTFOUND)
message(FATAL_ERROR "Need NaviTrack to build")
endif(NAVITRACK_LIB-NOTFOUND)
# include file for OpenTracker 2.0
find_path(NAVITRACK_INC "OpenTracker/OpenTracker.h"
${NAVITRACK_INC_DIR}
)
if(NAVITRACK_INC-NOTFOUND)
message(FATAL_ERROR "Need OpenTracker.h to build")
endif(NAVITRACK_INC-NOTFOUND)
else(USE_NAVITRACK)
else(Slicer3_USE_NAVITRACK)
set(NAVITRACK_LIB "")
set(NAVITRACK_INC "")
endif(USE_NAVITRACK)
endif(Slicer3_USE_NAVITRACK)
#
# IGSTK
# Built in Slicer3-lib
#
option(USE_IGSTK "Build Slicer3 with IGSTK support." OFF)
if(USE_IGSTK)
## IGSTK (Built in Slicer3-lib)
option(Slicer3_USE_IGSTK "Build Slicer3 with IGSTK support." OFF)
if(Slicer3_USE_IGSTK)
find_package(IGSTK REQUIRED)
include(${IGSTK_USE_FILE})
endif(USE_IGSTK)
endif(Slicer3_USE_IGSTK)
#-----------------------------------------------------------------------------
# Generate the default setup paths scripts.
# Generate some useful scripts that can be used to setup various environment
# variables and launch the executable properly against external packages.
#
include("${KWWidgets_CMAKE_DIR}/KWWidgetsPathsMacros.cmake")
set(extra_dirs
"${TEEM_DIR}/bin"
"${BatchMake_DIR}/bin"
"${Slicer3_HOME}/${Slicer3_INSTALL_PLUGINS_BIN_DIR}"
"${Slicer3_HOME}/${Slicer3_INSTALL_PLUGINS_LIB_DIR}"
"${Slicer3_HOME}/${Slicer3_INSTALL_MODULES_BIN_DIR}"
"${Slicer3_HOME}/${Slicer3_INSTALL_MODULES_LIB_DIR}"
)
kwwidgets_generate_setup_paths_scripts(
"${EXECUTABLE_OUTPUT_PATH}" "Slicer3SetupPaths" "${TEEM_DIR}/bin"
"${BatchMake_DIR}/bin")
"${EXECUTABLE_OUTPUT_PATH}" "Slicer3SetupPaths"
"${extra_dirs}"
)
#-----------------------------------------------------------------------------
# VTK 5.0 does not have VTK_CMAKE_DIR
# Alternatively you could use KWWidget's wrapping, which encapsulate
# the differences between various VTK versions:
# INCLUDE("${KWWidgets_CMAKE_DIR}/KWWidgetsWrappingMacros.cmake")
# KWWidgets_WRAP_TCL(${LIB_NAME} LIB_TCL_SRCS "${LIB_SRCS}" "")
#
if(NOT VTK_CMAKE_DIR)
set(VTK_CMAKE_DIR "${VTK_SOURCE_DIR}/CMake")
endif(NOT VTK_CMAKE_DIR)
include("${VTK_CMAKE_DIR}/vtkWrapTcl.cmake")
#-----------------------------------------------------------------------------
# Check versions of VTK to track CVS HEAD
#
## check versions of VTK to track CVS HEAD
#
find_package(VTK REQUIRED)
if(EXISTS ${VTK_CMAKE_DIR}/VTKVersionMacros.cmake)
include(${VTK_CMAKE_DIR}/VTKVersionMacros.cmake)
......@@ -227,90 +237,126 @@ if(VTKsource_revision LESS 1.2196)
message(FATAL_ERROR "Sorry, your VTK library was last updated on ${VTKsource_date}. Its source revision, according to vtkKWWidgetsVersion.h, is ${VTKsource_revision}. Please update to a newer revision.")
endif(VTKsource_revision LESS 1.2196)
#-----------------------------------------------------------------------------
# These packages may exist within the Slicer3 source tree
#
# These packages exist within the Slicer3 source tree
#
SET(GenerateCLP_DIR ${Slicer3_BINARY_DIR}/Libs/GenerateCLP)
SET(GenerateLM_DIR ${Slicer3_BINARY_DIR}/Libs/GenerateLM)
SET(ModuleDescriptionParser_DIR ${Slicer3_BINARY_DIR}/Libs/ModuleDescriptionParser)
SET(LoadableModule_DIR ${Slicer3_BINARY_DIR}/Libs/LoadableModule)
SET(vtkITK_DIR ${Slicer3_BINARY_DIR}/Libs/vtkITK)
SET(TCLAP_DIR ${Slicer3_BINARY_DIR}/Libs/tclap)
set(GenerateCLP_DIR ${Slicer3_BINARY_DIR}/Libs/GenerateCLP)
set(GenerateLM_DIR ${Slicer3_BINARY_DIR}/Libs/GenerateLM)
set(ModuleDescriptionParser_DIR ${Slicer3_BINARY_DIR}/Libs/ModuleDescriptionParser)
set(LoadableModule_DIR ${Slicer3_BINARY_DIR}/Libs/LoadableModule)
set(vtkITK_DIR ${Slicer3_BINARY_DIR}/Libs/vtkITK)
set(TCLAP_DIR ${Slicer3_BINARY_DIR}/Libs/tclap)
#
# --------------------------------------------------------------------------
# Configure and install headers
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/vtkSlicerConfigure.h.in
${CMAKE_CURRENT_BINARY_DIR}/vtkSlicerConfigure.h
)
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/vtkSlicerConfigure.h"
DESTINATION ${Slicer3_INSTALL_INCLUDE_DIR} COMPONENT Development
)
#-----------------------------------------------------------------------------
# Subdirectories
#
option(BUILD_CLI "Build Slicer3 CLI Plugins" ON)
mark_as_advanced(BUILD_CLI)
add_subdirectory(Libs)
add_subdirectory(Base)
add_subdirectory(Resources)
#-----------------------------------------------------------------------------
# At this point, let's not have the applications and modules guess which
# include paths or libraries they need, but use Slicer3_LIBRARIES and
# Slicer3_INCLUDE_DIRS instead. As far as modules are concerned, both
# include paths or libraries they need, but use Slicer3_*_LIBRARIES and
# Slicer3_*_INCLUDE_DIRS instead. As far as modules are concerned, both
# variables are actually set automatically by the import script when building
# against a Slicer3 build or installed tree. When in-source, we need to
# set both variables now. Retrieve them from the persistent property cache
# since they were collected in each subdir (which makes it impossible to
# use normal variables, since a new scope is created in each subdir).
#
slicer3_get_persistent_property(Slicer3_Libs_LIBRARIES Slicer3_Libs_LIBRARIES)
slicer3_get_persistent_property(Slicer3_Base_LIBRARIES Slicer3_Base_LIBRARIES)
GET_PERSISTENT_PROPERTY(Slicer3_LIBRARIES Slicer3_LIBRARIES)
GET_PERSISTENT_PROPERTY(Slicer3_INCLUDE_DIRS Slicer3_INCLUDE_DIRS)
slicer3_get_persistent_property(Slicer3_Libs_INCLUDE_DIRS Slicer3_Libs_INCLUDE_DIRS)
slicer3_get_persistent_property(Slicer3_Base_INCLUDE_DIRS Slicer3_Base_INCLUDE_DIRS)
option(BUILD_MODULES "Build Slicer3 Modules" ON)
mark_as_advanced(BUILD_MODULES)
#-----------------------------------------------------------------------------
# Modules and CLI
#
option(Slicer3_BUILD_CLI "Build Slicer3 CLI Plugins" ON)
option(Slicer3_BUILD_MODULES "Build Slicer3 Modules" ON)
if(BUILD_MODULES)
if(Slicer3_BUILD_MODULES)
add_subdirectory(Modules)
endif(BUILD_MODULES)
else(Slicer3_BUILD_MODULES)
# if Slicer3_BUILD_CLI is ON, we still need at least the CommandLineModule
# so that we can have CLI, without all the other modules
if(Slicer3_BUILD_CLI)
add_subdirectory(Modules/CommandLineModule)
endif(Slicer3_BUILD_CLI)
endif(Slicer3_BUILD_MODULES)
## Applications need to be built after Modules to capture the TractTracing in
## the correct ordering.
#-----------------------------------------------------------------------------
# Applications need to be built after Modules to capture the TractTracing in
# the correct ordering.
#
add_subdirectory(Applications)
#-----------------------------------------------------------------------------
# Testing
#
if(Slicer3_BUILD_TESTING)
add_subdirectory(Testing)
endif(Slicer3_BUILD_TESTING)
# include a test for endianness (used to be done by default)
include(${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
test_big_endian(CMAKE_WORDS_BIGENDIAN)
# Install testing data
install(DIRECTORY
Testing
DESTINATION ${Slicer3_INSTALL_SHARE_DIR} COMPONENT Development
PATTERN ".svn" EXCLUDE
PATTERN "CMakeLists.txt" EXCLUDE
)
#-----------------------------------------------------------------------------
# Launcher for slicer
#
add_subdirectory(Utilities/Launcher)
configure_file(
${Slicer3_SOURCE_DIR}/launch.tcl.in
"${Slicer3_BINARY_DIR}/${Slicer3_INSTALL_LIB_DIR}/launch.tcl"
)
install(
FILES "${Slicer3_BINARY_DIR}/${Slicer3_INSTALL_LIB_DIR}/launch.tcl"
DESTINATION ${Slicer3_INSTALL_LIB_DIR}
)
#-----------------------------------------------------------------------------
# Package slicer
#
add_subdirectory(Utilities/Package)
#-----------------------------------------------------------------------------
# Documentation
#
option(BUILD_DOCUMENTATION "Build Slicer3 Documentation" OFF)
if(BUILD_DOCUMENTATION)
add_subdirectory(Utilities/Doxygen)
endif(BUILD_DOCUMENTATION)
# CMAke 2.4 does not have INSTALL(DIRECTORY ...) do it manually
#INSTALL(DIRECTORY "${Slicer3_BINARY_DIR}/Modules/Packages"
# DESTINATION ${SLICER_INSTALL_LIBRARIES_DIR}/Modules)
install(CODE "EXECUTE_PROCESS\(COMMAND \"${CMAKE_COMMAND}\" -E copy_directory \"${SLICER_LIBRARIES_DIR}/Modules/Packages\" \"\${CMAKE_INSTALL_PREFIX}/${SLICER_INSTALL_LIBRARIES_DIR}/Modules/Packages\"\)")
configure_file(
${Slicer3_SOURCE_DIR}/launch.tcl.in
${Slicer3_BINARY_DIR}/lib/launch.tcl
)
install(
FILES ${Slicer3_BINARY_DIR}/lib/launch.tcl
DESTINATION lib
)
# setup file for setting custom ctest vars
configure_file(${Slicer3_SOURCE_DIR}/CTestCustom.cmake.in
${Slicer3_BINARY_DIR}/CTestCustom.cmake @ONLY)
#-----------------------------------------------------------------------------
# Set up for building against a Slicer3 build tree and a Slicer3 installation
#
#
include(${Slicer3_SOURCE_DIR}/GenerateSlicer3Config.cmake)
configure_file(${Slicer3_SOURCE_DIR}/UseSlicer3.cmake.in
......@@ -320,6 +366,6 @@ install(FILES
# ${Slicer3_BINARY_DIR}/Slicer3BuildSettings.cmake
${Slicer3_BINARY_DIR}/UseSlicer3.cmake
${Slicer3_BINARY_DIR}/Utilities/Slicer3Config.cmake
DESTINATION lib/Slicer3
DESTINATION ${Slicer3_INSTALL_LIB_DIR}
COMPONENT Development
)
......@@ -30,7 +30,7 @@ PROJECT_NUMBER =
# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.
OUTPUT_DIRECTORY = $(SLICER_DOC)
OUTPUT_DIRECTORY = $(Slicer3_DOC)
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output
......@@ -459,7 +459,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
INPUT = $(SLICER_HOME)
INPUT = $(Slicer3_HOME)
# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
......@@ -1046,7 +1046,7 @@ TAGFILES =
# When a file name is specified after GENERATE_TAGFILE, doxygen will create
# a tag file that is based on the input files it reads.
GENERATE_TAGFILE = $(SLICER_DOC)/Slicer3NightlyDoc.tag
GENERATE_TAGFILE = $(Slicer3_DOC)/Slicer3NightlyDoc.tag
# If the ALLEXTERNALS tag is set to YES all external classes will be listed
# in the class index. If set to NO only the inherited external classes
......
......@@ -23,13 +23,17 @@ SET(TCLAP_DIR_CONFIG ${Slicer3_BINARY_DIR}/Libs/tclap)
SET(ModuleDescriptionParser_DIR_CONFIG ${Slicer3_BINARY_DIR}/Libs/ModuleDescriptionParser)
SET(LoadableModule_DIR_CONFIG ${Slicer3_BINARY_DIR}/Libs/LoadableModule)
SET(GenerateCLP_DIR_CONFIG ${Slicer3_BINARY_DIR}/Libs/GenerateCLP)
SET(GenerateCLP_USE_FILE_CONFIG ${Slicer3_BINARY_DIR}/Libs/GenerateCLP/UseGenerateCLP.cmake)
SET(Slicer3_INCLUDE_DIRS_CONFIG ${Slicer3_INCLUDE_DIRS})
SET(Slicer3_LIBRARY_DIRS_CONFIG ${Slicer3_BINARY_DIR}/bin)
SET(Slicer3_Libs_INCLUDE_DIRS_CONFIG ${Slicer3_Libs_INCLUDE_DIRS})
SET(Slicer3_Libs_LIBRARY_DIRS_CONFIG ${Slicer3_BINARY_DIR}/bin)
SET(Slicer3_Base_INCLUDE_DIRS_CONFIG ${Slicer3_Base_INCLUDE_DIRS})
SET(Slicer3_Base_LIBRARY_DIRS_CONFIG ${Slicer3_BINARY_DIR}/bin)
SET(ITK_DIR_CONFIG ${ITK_DIR})
SET(VTK_DIR_CONFIG ${VTK_DIR})
SET(KWWidgets_DIR_CONFIG ${KWWidgets_DIR})
SET(TEEM_DIR_CONFIG ${TEEM_DIR})
# Configure Slicer3Config.cmake for the install tree.
CONFIGURE_FILE(
......
......@@ -8,41 +8,91 @@
#
# The C and C++ flags added by Slicer3 to the cmake-configured flags.
SET(Slicer3_REQUIRED_C_FLAGS "@Slicer3_REQUIRED_C_FLAGS@")
SET(Slicer3_REQUIRED_CXX_FLAGS "@Slicer3_REQUIRED_CXX_FLAGS@")
SET(Slicer3_REQUIRED_LINK_FLAGS "@Slicer3_REQUIRED_LINK_FLAGS@")
set(Slicer3_REQUIRED_C_FLAGS "@Slicer3_REQUIRED_C_FLAGS@")
set(Slicer3_REQUIRED_CXX_FLAGS "@Slicer3_REQUIRED_CXX_FLAGS@")
set(Slicer3_REQUIRED_LINK_FLAGS "@Slicer3_REQUIRED_LINK_FLAGS@")
# The Slicer3 version number
SET(Slicer3_VERSION_MAJOR "@Slicer3_VERSION_MAJOR@")
SET(Slicer3_VERSION_MINOR "@Slicer3_VERSION_MINOR@")
SET(Slicer3_VERSION_PATCH "@Slicer3_VERSION_PATCH@")
set(Slicer3_VERSION_MAJOR "@Slicer3_VERSION_MAJOR@")
set(Slicer3_VERSION_MINOR "@Slicer3_VERSION_MINOR@")
set(Slicer3_VERSION_PATCH "@Slicer3_VERSION_PATCH@")
# Whether Slicer3 was built with modules and CLI support.
set(Slicer3_BUILD_MODULES "@Slicer3_BUILD_MODULES@")
set(Slicer3_BUILD_CLI "@Slicer3_BUILD_CLI@")
# Whether Slicer3 was built with shared libraries.
SET(Slicer3_BUILD_SHARED "@BUILD_SHARED_LIBS@")
set(Slicer3_BUILD_SHARED "@BUILD_SHARED_LIBS@")
# Slicer3 options
set(Slicer3_USE_BatchMake "@Slicer3_USE_BatchMake@")
set(Slicer3_USE_IGSTK "@Slicer3_USE_IGSTK@")
set(Slicer3_USE_MIDAS "@Slicer3_USE_MIDAS@")
set(Slicer3_USE_NAVITRACK "@Slicer3_USE_NAVITRACK@")
set(Slicer3_USE_NUMPY "@Slicer3_USE_NUMPY@")
set(Slicer3_USE_PYTHON "@Slicer3_USE_PYTHON@")
set(Slicer3_USE_OPENTRACKER "@Slicer3_USE_OPENTRACKER@")
# Slicer home (top of the tree)
set(Slicer3_HOME "@Slicer3_HOME@")
# The CMake macros dir.
set(Slicer3_CMAKE_DIR "@Slicer3_CMAKE_DIR@")
# Slicer3 Libs libraries. Those listed here should
# automatically pull in their dependencies.
set(Slicer3_Libs_LIBRARIES "@Slicer3_Libs_LIBRARIES@")
# A list of all libraries for Slicer3. Those listed here should
# Slicer3 Libs library directories.
set(Slicer3_Libs_LIBRARY_DIRS "@Slicer3_Libs_LIBRARY_DIRS_CONFIG@")
# Slicer3 Libs include file directories.
set(Slicer3_Libs_INCLUDE_DIRS "@Slicer3_Libs_INCLUDE_DIRS_CONFIG@")
# Slicer3 Base libraries. Those listed here should
# automatically pull in their dependencies.
SET(Slicer3_LIBRARIES "@Slicer3_LIBRARIES@")
set(Slicer3_Base_LIBRARIES "@Slicer3_Base_LIBRARIES@")
# The Slicer3 include file directories.
SET(Slicer3_INCLUDE_DIRS "@Slicer3_INCLUDE_DIRS_CONFIG@")
# Slicer3 Base library directories.
set(Slicer3_Base_LIBRARY_DIRS "@Slicer3_Base_LIBRARY_DIRS_CONFIG@")
# The Slicer3 library directories.
SET(Slicer3_LIBRARY_DIRS "@Slicer3_LIBRARY_DIRS_CONFIG@")
# Slicer3 Base include file directories.
set(Slicer3_Base_INCLUDE_DIRS "@Slicer3_BINARY_DIR@" "@Slicer3_Base_INCLUDE_DIRS_CONFIG@")
# The location of the UseSlicer3.cmake file.
SET(Slicer3_USE_FILE "@Slicer3_USE_FILE_CONFIG@")
set(Slicer3_USE_FILE "@Slicer3_USE_FILE_CONFIG@")
# The build settings file.
SET(Slicer3_BUILD_SETTINGS_FILE "@Slicer3_BUILD_SETTINGS_FILE@")
set(Slicer3_BUILD_SETTINGS_FILE "@Slicer3_BUILD_SETTINGS_FILE@")
# The Slicer3 relative install directories.
set(Slicer3_INSTALL_BIN_DIR "@Slicer3_INSTALL_BIN_DIR@")
set(Slicer3_INSTALL_LIB_DIR "@Slicer3_INSTALL_LIB_DIR@")
set(Slicer3_INSTALL_INCLUDE_DIR "@Slicer3_INSTALL_INCLUDE_DIR@")
set(Slicer3_INSTALL_SHARE_DIR "@Slicer3_INSTALL_SHARE_DIR@")
set(Slicer3_INSTALL_ITKFACTORIES_DIR "@Slicer3_INSTALL_ITKFACTORIES_DIR@")
set(Slicer3_INSTALL_PLUGINS_BIN_DIR "@Slicer3_INSTALL_PLUGINS_BIN_DIR@")
set(Slicer3_INSTALL_PLUGINS_LIB_DIR "@Slicer3_INSTALL_PLUGINS_LIB_DIR@")
set(Slicer3_INSTALL_PLUGINS_INCLUDE_DIR "@Slicer3_INSTALL_PLUGINS_INCLUDE_DIR@")
set(Slicer3_INSTALL_PLUGINS_SHARE_DIR "@Slicer3_INSTALL_PLUGINS_SHARE_DIR@")
set(Slicer3_INSTALL_PLUGINS_CACHE_DIR "@Slicer3_INSTALL_PLUGINS_CACHE_DIR@")
set(Slicer3_INSTALL_MODULES_BIN_DIR "@Slicer3_INSTALL_MODULES_BIN_DIR@")
set(Slicer3_INSTALL_MODULES_LIB_DIR "@Slicer3_INSTALL_MODULES_LIB_DIR@")
set(Slicer3_INSTALL_MODULES_INCLUDE_DIR "@Slicer3_INSTALL_MODULES_INCLUDE_DIR@")
set(Slicer3_INSTALL_MODULES_SHARE_DIR "@Slicer3_INSTALL_MODULES_SHARE_DIR@")
# The Slicer3 install prefix (*not* defined in the install tree)
set(Slicer3_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
# Components needed to build modules from outside a Slicer3 build tree or
# from outside a Slicer3 installation tree
SET(TCLAP_DIR "@TCLAP_DIR_CONFIG@")
SET(ModuleDescriptionParser_DIR "@ModuleDescriptionParser_DIR_CONFIG@")
SET(GenerateCLP_DIR "@GenerateCLP_DIR_CONFIG@")