SlicerInstallConfig.cmake.in 5.7 KB
Newer Older
1
#
2
# SlicerConfig.cmake - Slicer CMake configuration file for external projects
3
#
4 5 6 7
# This file is configured by Slicer and used by UseSlicer.cmake module
# to load Slicer's settings for an external project. External projects
# can use these setting to build new modules against a Slicer build tree
# or a Slicer installation.
8 9
#

10
# The C and C++ flags added by Slicer to the cmake-configured flags.
11 12 13
set(Slicer_REQUIRED_C_FLAGS "@Slicer_REQUIRED_C_FLAGS@")
set(Slicer_REQUIRED_CXX_FLAGS "@Slicer_REQUIRED_CXX_FLAGS@")
set(Slicer_REQUIRED_LINK_FLAGS "@Slicer_REQUIRED_LINK_FLAGS@")
14

15
# The Slicer version number
16 17 18
set(Slicer_VERSION_MAJOR "@Slicer_VERSION_MAJOR@")
set(Slicer_VERSION_MINOR "@Slicer_VERSION_MINOR@")
set(Slicer_VERSION_PATCH "@Slicer_VERSION_PATCH@")
19

20
# Whether Slicer was built with modules and CLI support.
21
set(Slicer_BUILD_CLI "@Slicer_BUILD_CLI@")
22
set(Slicer_BUILD_QTLOADABLEMODULES "@Slicer_BUILD_QTLOADABLEMODULES@")
23

24
# Whether Slicer was built with shared libraries.
25
set(Slicer_BUILD_SHARED "@BUILD_SHARED_LIBS@")
26

27
# Slicer options
28
set(Slicer_USE_BatchMake "@Slicer_USE_BatchMake@")
29
set(Slicer_USE_IGSTK "@Slicer_USE_IGSTK@")
30
set(Slicer_USE_MIDAS "@Slicer_USE_MIDAS@")
31
set(Slicer_USE_NAVITRACK "@Slicer_USE_NAVITRACK@")
32
set(Slicer_USE_NUMPY "@Slicer_USE_NUMPY@")
33 34
set(Slicer_USE_PYTHONQT "@Slicer_USE_PYTHONQT@")
set(Slicer_USE_PYTHONQT_WITH_TCL "@Slicer_USE_PYTHONQT_WITH_TCL@")
35
set(Slicer_USE_OPENTRACKER "@Slicer_USE_OPENTRACKER@")
36 37 38 39

# Slicer could be installed anywhere, so set all paths based on where 
# this file was found (which should be the lib/Slicer3 directory of the 
# installation)
40
get_filename_component(Slicer_CONFIG_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
41 42

# Slicer home (top of the tree)
43
set(Slicer_HOME "${Slicer_CONFIG_DIR}/../..")
44
get_filename_component(Slicer_HOME ${Slicer_HOME} ABSOLUTE)
45 46

# The CMake macros dir.
47
set(Slicer_CMAKE_DIR "${Slicer_HOME}/@Slicer_INSTALL_LIB_DIR@/CMake")
48

49
# Slicer Libs library directories.
50
set(Slicer_Libs_LIBRARY_DIRS 
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
  "${Slicer_HOME}/lib/FreeSurfer"
  "${Slicer_HOME}/lib/IGT"
  "${Slicer_HOME}/lib/ITKCommandIO"
  "${Slicer_HOME}/lib/LoadableModule"
  "${Slicer_HOME}/lib/MGHImageIO"
  "${Slicer_HOME}/lib/MRML"
  "${Slicer_HOME}/lib/MRMLIDImageIO"
  "${Slicer_HOME}/lib/ModuleDescriptionParser"
  "${Slicer_HOME}/lib/Qdec"
  "${Slicer_HOME}/lib/tclap"
  "${Slicer_HOME}/lib/vtkITK"
  "${Slicer_HOME}/lib/vtkTeem"
  "${Slicer_HOME}/lib/TclTk/lib"
  "${Slicer_HOME}/lib/TclTk/lib/itcl@INCR_TCL_VERSION_DOT@"
  "${Slicer_HOME}/lib/TclTk/lib/itk@INCR_TCL_VERSION_DOT@"
66 67
  )

68
# Slicer Libs include file directories.
69
set(Slicer_Libs_INCLUDE_DIRS 
70 71 72 73 74 75 76 77 78 79 80 81
  "${Slicer_HOME}/include/FreeSurfer"
  "${Slicer_HOME}/include/IGT"
  "${Slicer_HOME}/include/ITKCommandIO"
  "${Slicer_HOME}/include/LoadableModule"
  "${Slicer_HOME}/include/MGHImageIO"
  "${Slicer_HOME}/include/MRML"
  "${Slicer_HOME}/include/MRMLIDImageIO"
  "${Slicer_HOME}/include/ModuleDescriptionParser"
  "${Slicer_HOME}/include/Qdec"
  "${Slicer_HOME}/include/tclap"
  "${Slicer_HOME}/include/vtkITK"
  "${Slicer_HOME}/include/vtkTeem"
82 83
  )

84
# Slicer Base library directories.
85
set(Slicer_Base_LIBRARY_DIRS 
86
  "${Slicer_HOME}/@Slicer_INSTALL_LIB_DIR@"
87 88
  )

89
# Slicer Base include file directories.
90
set(Slicer_Base_INCLUDE_DIRS 
91 92 93 94
  "${Slicer_HOME}/@Slicer_INSTALL_INCLUDE_DIR@" 
  "${Slicer_HOME}/@Slicer_INSTALL_INCLUDE_DIR@/SlicerBaseCLI" 
  "${Slicer_HOME}/@Slicer_INSTALL_INCLUDE_DIR@/SlicerBaseGUI" 
  "${Slicer_HOME}/@Slicer_INSTALL_INCLUDE_DIR@/SlicerBaseLogic" 
95
  )
96

97 98
# The location of the UseSlicer.cmake file.
set(Slicer_USE_FILE "${Slicer_CONFIG_DIR}/UseSlicer.cmake")
99 100

# The build settings file.
101
set(Slicer_BUILD_SETTINGS_FILE 
102
  "${Slicer_CONFIG_DIR}/SlicerBuildSettings.cmake")
103

104
# The Slicer relative install directories.
105 106 107 108 109 110 111 112 113 114 115 116
set(Slicer_INSTALL_BIN_DIR "@Slicer_INSTALL_BIN_DIR@")
set(Slicer_INSTALL_LIB_DIR "@Slicer_INSTALL_LIB_DIR@")
set(Slicer_INSTALL_INCLUDE_DIR "@Slicer_INSTALL_INCLUDE_DIR@")
set(Slicer_INSTALL_SHARE_DIR "@Slicer_INSTALL_SHARE_DIR@")
set(Slicer_INSTALL_ITKFACTORIES_DIR "@Slicer_INSTALL_ITKFACTORIES_DIR@")

set(Slicer_INSTALL_PLUGINS_BIN_DIR "@Slicer_INSTALL_PLUGINS_BIN_DIR@")
set(Slicer_INSTALL_PLUGINS_LIB_DIR "@Slicer_INSTALL_PLUGINS_LIB_DIR@")
set(Slicer_INSTALL_PLUGINS_INCLUDE_DIR "@Slicer_INSTALL_PLUGINS_INCLUDE_DIR@")
set(Slicer_INSTALL_PLUGINS_SHARE_DIR "@Slicer_INSTALL_PLUGINS_SHARE_DIR@")
set(Slicer_INSTALL_PLUGINS_CACHE_DIR "@Slicer_INSTALL_PLUGINS_CACHE_DIR@")

117
IF(Slicer_BUILD_QTLOADABLEMODULES)
118 119 120 121
  set(Slicer_INSTALL_QTLOADABLEMODULES_BIN_DIR "@Slicer_INSTALL_QTLOADABLEMODULES_BIN_DIR@")
  set(Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR "@Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR@")
  set(Slicer_INSTALL_QTLOADABLEMODULES_INCLUDE_DIR "@Slicer_INSTALL_QTLOADABLEMODULES_INCLUDE_DIR@")
  set(Slicer_INSTALL_QTLOADABLEMODULES_SHARE_DIR "@Slicer_INSTALL_QTLOADABLEMODULES_SHARE_DIR@")
122
ENDIF()
jcfr's avatar
jcfr committed
123

124 125
# Components needed to build modules from outside a Slicer build tree or 
# from outside a Slicer installation tree
126 127 128 129 130 131 132 133
set(TCLAP_DIR "${Slicer_HOME}/lib/tclap")
set(ModuleDescriptionParser_DIR "${Slicer_HOME}/lib/ModuleDescriptionParser")
set(GenerateCLP_DIR "${Slicer_HOME}/lib/GenerateCLP")
set(GenerateLM_DIR "${Slicer_HOME}/lib/GenerateLM")
set(ITK_DIR "${Slicer_HOME}/lib/InsightToolkit")
set(LoadableModule_DIR "${Slicer_HOME}/lib/LoadableModule")
set(Teem_DIR "${Slicer_HOME}/lib/Teem-@Teem_VERSION_MAJOR@.@Teem_VERSION_MINOR@.@Teem_VERSION_PATCH@")
set(VTK_DIR "${Slicer_HOME}/lib/vtk-@VTK_MAJOR_VERSION@.@VTK_MINOR_VERSION@")
134
set(PYTHON_INCLUDE_PATH "@PYTHON_INCLUDE_PATH@")
135
get_filename_component(PYTHON_LIB_FILE "${PYTHON_LIBRARY}" NAME)
136
set(PYTHON_LIBRARIES "${Slicer_HOME}/lib/Python/lib/${PYTHON_LIB_FILE}")
137
get_filename_component(PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_PATH}" NAME)
138
set(PYTHON_INCLUDE_PATH "${Slicer_HOME}/lib/Python/include/${PYTHON_INCLUDE_DIR}")