-
Notifications
You must be signed in to change notification settings - Fork 458
/
SlicerConfig.cmake.in
218 lines (174 loc) · 8.79 KB
/
SlicerConfig.cmake.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
#
# SlicerConfig.cmake - Slicer CMake configuration file for external projects
#
# 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.
#
# Macro allowing to set a variable or complain if already defined
macro(__SLICER_SET_OR_COMPLAIN_IF_DEFINED var value)
if(DEFINED ${var} AND NOT SlicerConfig_INCLUDED_ONCE)
message(FATAL_ERROR "Variable ${var} has been defined prior calling find_package(Slicer) !")
endif()
set(${var} "${value}")
endmacro()
# Slicer options
set(Slicer_USE_BatchMake "@Slicer_USE_BatchMake@")
set(Slicer_USE_MIDAS "@Slicer_USE_MIDAS@")
set(Slicer_USE_NUMPY "@Slicer_USE_NUMPY@")
set(Slicer_USE_OpenIGTLink "@Slicer_USE_OpenIGTLink@")
set(Slicer_USE_PYTHONQT "@Slicer_USE_PYTHONQT@")
set(Slicer_USE_PYTHONQT_WITH_TCL "@Slicer_USE_PYTHONQT_WITH_TCL@")
# Qt
__SLICER_SET_OR_COMPLAIN_IF_DEFINED(QT_QMAKE_EXECUTABLE "@QT_QMAKE_EXECUTABLE_CONFIG@")
set(Slicer_REQUIRED_QT_VERSION "@Slicer_REQUIRED_QT_VERSION@")
set(Slicer_REQUIRED_QT_MODULES "@Slicer_REQUIRED_QT_MODULES@")
# Slicer libraries
__SLICER_SET_OR_COMPLAIN_IF_DEFINED(GenerateCLP_DIR "@GenerateCLP_DIR_CONFIG@")
__SLICER_SET_OR_COMPLAIN_IF_DEFINED(ModuleDescriptionParser_DIR "@ModuleDescriptionParser_DIR_CONFIG@")
__SLICER_SET_OR_COMPLAIN_IF_DEFINED(TCLAP_DIR "@TCLAP_DIR_CONFIG@")
# External projects
if(Slicer_USE_BatchMake)
__SLICER_SET_OR_COMPLAIN_IF_DEFINED(BatchMake_DIR "@BatchMake_DIR_CONFIG@")
endif()
__SLICER_SET_OR_COMPLAIN_IF_DEFINED(CTK_DIR "@CTK_DIR_CONFIG@")
__SLICER_SET_OR_COMPLAIN_IF_DEFINED(ITK_DIR "@ITK_DIR_CONFIG@")
if(Slicer_USE_OpenIGTLink)
__SLICER_SET_OR_COMPLAIN_IF_DEFINED(OpenIGTLink_DIR "@OpenIGTLink_DIR_CONFIG@")
endif()
__SLICER_SET_OR_COMPLAIN_IF_DEFINED(PYTHON_INCLUDE_PATH "@PYTHON_INCLUDE_PATH@")
__SLICER_SET_OR_COMPLAIN_IF_DEFINED(PYTHON_LIBRARIES "@PYTHON_LIBRARIES@")
__SLICER_SET_OR_COMPLAIN_IF_DEFINED(qCDashAPI_DIR "@qCDashAPI_DIR_CONFIG@")
__SLICER_SET_OR_COMPLAIN_IF_DEFINED(SLICERLIBCURL_DIR "@SLICERLIBCURL_DIR_CONFIG@")
__SLICER_SET_OR_COMPLAIN_IF_DEFINED(Teem_DIR "@Teem_DIR_CONFIG@")
__SLICER_SET_OR_COMPLAIN_IF_DEFINED(VTK_DIR "@VTK_DIR_CONFIG@")
# List all required external project
set(Slicer_EXTERNAL_PROJECTS @Slicer_EXTERNAL_PROJECTS_CONFIG@)
# Include external projects
foreach(proj ${Slicer_EXTERNAL_PROJECTS})
find_package(${proj} REQUIRED)
endforeach()
# Slicer CMake macros and functions directory
set(Slicer_CMAKE_DIR "@Slicer_CMAKE_DIR@")
set(Slicer_EXTENSIONS_CMAKE_DIR "@Slicer_EXTENSIONS_CMAKE_DIR@")
# Update CMake module path
set(CMAKE_MODULE_PATH
${Slicer_CMAKE_DIR}
${Slicer_EXTENSIONS_CMAKE_DIR}
${VTK_CMAKE_DIR}
${CTK_CMAKE_DIR}
${CTK_CMAKE_UTILITIES_DIR}
${CMAKE_MODULE_PATH}
)
# Note: This block should be added after VTK and CTK are found.
# Indeed, it will check if both VTK_QT_QMAKE_EXECUTABLE and CTK_QT_QMAKE_EXECUTABLE
# are valid.
include(SlicerBlockFindQtAndCheckVersion)
# Launcher command
set(Slicer_LAUNCHER_EXECUTABLE "@Slicer_LAUNCHER_EXECUTABLE_CONFIG@")
set(Slicer_LAUNCH_COMMAND "@Slicer_LAUNCH_COMMAND_CONFIG@")
# Slicer version number
set(Slicer_MAJOR_VERSION "@Slicer_MAJOR_VERSION@")
set(Slicer_MINOR_VERSION "@Slicer_MINOR_VERSION@")
set(Slicer_PATCH_VERSION "@Slicer_PATCH_VERSION@")
# Slicer working copy Revision, URL and Root
set(Slicer_WC_REVISION "@Slicer_WC_REVISION@")
set(Slicer_WC_URL "@Slicer_WC_URL@")
set(Slicer_WC_ROOT "@Slicer_WC_ROOT@")
# Slicer platform and architecture
set(Slicer_PLATFORM "@Slicer_PLATFORM@")
set(Slicer_ARCHITECTURE "@Slicer_ARCHITECTURE@")
# License and Readme file
set(Slicer_LICENSE_FILE "@Slicer_LICENSE_FILE_CONFIG@")
set(Slicer_README_FILE "@Slicer_README_FILE_CONFIG@")
# Test templates directory
set(Slicer_CXX_MODULE_TEST_TEMPLATES_DIR "@Slicer_CXX_MODULE_TEST_TEMPLATES_DIR_CONFIG@")
set(Slicer_PYTHON_MODULE_TEST_TEMPLATES_DIR "@Slicer_PYTHON_MODULE_TEST_TEMPLATES_DIR_CONFIG@")
# Path to extension CPack script
set(Slicer_EXTENSION_CPACK "@Slicer_EXTENSION_CPACK_CONFIG@")
# Whether Slicer was built with modules and CLI support.
set(Slicer_BUILD_CLI "@Slicer_BUILD_CLI@")
set(Slicer_BUILD_QTLOADABLEMODULES "@Slicer_BUILD_QTLOADABLEMODULES@")
set(Slicer_BUILD_QTSCRIPTEDMODULES "@Slicer_BUILD_QTSCRIPTEDMODULES@")
# Whether Slicer was built with shared libraries.
set(Slicer_BUILD_SHARED "@BUILD_SHARED_LIBS@")
set(Slicer_LIBRARY_PROPERTIES "@Slicer_LIBRARY_PROPERTIES@")
# Export header for BuildModuleLogic and BuildQTModule
set(Slicer_EXPORT_HEADER_TEMPLATE "@Slicer_EXPORT_HEADER_TEMPLATE@")
set(Slicer_LOGOS_RESOURCE "@Slicer_LOGOS_RESOURCE@")
# Slicer home (top of the tree)
set(Slicer_HOME "@Slicer_HOME@")
# Slicer Core library
set(Slicer_CORE_LIBRARY @Slicer_CORE_LIBRARY_CONFIG@)
# Slicer GUI library
set(Slicer_GUI_LIBRARY @Slicer_GUI_LIBRARY_CONFIG@)
# MRML libraries - This variable regroup all related MRML libraries
set(MRML_LIBRARIES @MRML_LIBRARIES@)
# Slicer Libs VTK wrapped libraries
set(Slicer_Libs_VTK_WRAPPED_LIBRARIES "@Slicer_Libs_VTK_WRAPPED_LIBRARIES@")
# Slicer Libs include file directories.
set(Slicer_Libs_INCLUDE_DIRS "@Slicer_Libs_INCLUDE_DIRS_CONFIG@")
# Slicer Base include file directories.
set(Slicer_Base_INCLUDE_DIRS "@Slicer_BINARY_DIR@" "@Slicer_Base_INCLUDE_DIRS_CONFIG@")
# Slicer Module logic include file directories.
set(Slicer_ModuleLogic_INCLUDE_DIRS "@Slicer_ModuleLogic_INCLUDE_DIRS_CONFIG@")
# Slicer Module MRML include file directories.
set(Slicer_ModuleMRML_INCLUDE_DIRS "@Slicer_ModuleMRML_INCLUDE_DIRS_CONFIG@")
# Slicer Module Widgets include file directories.
set(Slicer_ModuleWidgets_INCLUDE_DIRS "@Slicer_ModuleWidgets_INCLUDE_DIRS_CONFIG@")
# The location of the UseSlicer.cmake file.
set(Slicer_USE_FILE "@Slicer_USE_FILE_CONFIG@")
# Slicer relative build directories.
set(Slicer_BIN_DIR "@Slicer_BIN_DIR@")
set(Slicer_LIB_DIR "@Slicer_LIB_DIR@")
set(Slicer_INCLUDE_DIR "@Slicer_INCLUDE_DIR@")
set(Slicer_SHARE_DIR "@Slicer_SHARE_DIR@")
set(Slicer_ITKFACTORIES_DIR "@Slicer_ITKFACTORIES_DIR@")
set(Slicer_PLUGINS_BIN_DIR "@Slicer_PLUGINS_BIN_DIR@")
set(Slicer_PLUGINS_LIB_DIR "@Slicer_PLUGINS_LIB_DIR@")
set(Slicer_PLUGINS_INCLUDE_DIR "@Slicer_PLUGINS_INCLUDE_DIR@")
set(Slicer_PLUGINS_SHARE_DIR "@Slicer_PLUGINS_SHARE_DIR@")
if(Slicer_BUILD_QTLOADABLEMODULES)
set(Slicer_QTLOADABLEMODULES_BIN_DIR "@Slicer_QTLOADABLEMODULES_BIN_DIR@")
set(Slicer_QTLOADABLEMODULES_LIB_DIR "@Slicer_QTLOADABLEMODULES_LIB_DIR@")
set(Slicer_QTLOADABLEMODULES_INCLUDE_DIR "@Slicer_QTLOADABLEMODULES_INCLUDE_DIR@")
set(Slicer_QTLOADABLEMODULES_SHARE_DIR "@Slicer_QTLOADABLEMODULES_SHARE_DIR@")
endif()
if(Slicer_BUILD_QTSCRIPTEDMODULES)
set(Slicer_QTSCRIPTEDMODULES_BIN_DIR "@Slicer_QTSCRIPTEDMODULES_BIN_DIR@")
set(Slicer_QTSCRIPTEDMODULES_LIB_DIR "@Slicer_QTSCRIPTEDMODULES_LIB_DIR@")
set(Slicer_QTSCRIPTEDMODULES_INCLUDE_DIR "@Slicer_QTSCRIPTEDMODULES_INCLUDE_DIR@")
set(Slicer_QTSCRIPTEDMODULES_SHARE_DIR "@Slicer_QTSCRIPTEDMODULES_SHARE_DIR@")
endif()
# Slicer install root
set(Slicer_INSTALL_ROOT "@Slicer_INSTALL_ROOT@")
# Slicer relative install directories.
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@")
if(Slicer_BUILD_QTLOADABLEMODULES)
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@")
endif()
if(Slicer_BUILD_QTSCRIPTEDMODULES)
set(Slicer_INSTALL_QTSCRIPTEDMODULES_BIN_DIR "@Slicer_INSTALL_QTSCRIPTEDMODULES_BIN_DIR@")
set(Slicer_INSTALL_QTSCRIPTEDMODULES_LIB_DIR "@Slicer_INSTALL_QTSCRIPTEDMODULES_LIB_DIR@")
set(Slicer_INSTALL_QTSCRIPTEDMODULES_INCLUDE_DIR "@Slicer_INSTALL_QTSCRIPTEDMODULES_INCLUDE_DIR@")
set(Slicer_INSTALL_QTSCRIPTEDMODULES_SHARE_DIR "@Slicer_INSTALL_QTSCRIPTEDMODULES_SHARE_DIR@")
endif()
# The Slicer install prefix (*not* defined in the install tree)
set(Slicer_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
# The Slicer targets file.
if(EXISTS "@Slicer_TARGETS_FILE@")
include("@Slicer_TARGETS_FILE@")
endif()
set(SlicerConfig_INCLUDED_ONCE 1 CACHE INTERNAL "True if SlicerConfig has already been included")