Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 380 lines (327 sloc) 15.454 kb
594f932 @jcfr ENH: Simplify and optimize superbuild
jcfr authored
1 ################################################################################
2 #
3 # Program: 3D Slicer
4 #
05cbce1 @jcfr STYLE: Remove year from Kitware copyright
jcfr authored
5 # Copyright (c) Kitware Inc.
594f932 @jcfr ENH: Simplify and optimize superbuild
jcfr authored
6 #
77b7beb @jcfr STYLE: Rename Doc/copyright/copyright.txt into COPYRIGHT.txt
jcfr authored
7 # See COPYRIGHT.txt
594f932 @jcfr ENH: Simplify and optimize superbuild
jcfr authored
8 # or http://www.slicer.org/copyright/copyright.txt for details.
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 #
16 # This file was originally developed by
17 # Dave Partyka and Jean-Christophe Fillion-Robin, Kitware Inc.
18 # and was partially funded by NIH grant 3P41RR013218-12S1
19 #
20 ################################################################################
21
22 #-----------------------------------------------------------------------------
a2cbc2c @jcfr STYLE: Fix typo "protocol" instead of "protocole"
jcfr authored
23 # Git protocol option
594f932 @jcfr ENH: Simplify and optimize superbuild
jcfr authored
24 #-----------------------------------------------------------------------------
b2ef1b9 @jcfr COMP: Superbuild.cmake - Use ${CMAKE_PROJECT_NAME} to declare USE_GIT…
jcfr authored
25 option(${CMAKE_PROJECT_NAME}_USE_GIT_PROTOCOL "If behind a firewall turn this off to use http instead." ON)
594f932 @jcfr ENH: Simplify and optimize superbuild
jcfr authored
26 set(git_protocol "git")
b2ef1b9 @jcfr COMP: Superbuild.cmake - Use ${CMAKE_PROJECT_NAME} to declare USE_GIT…
jcfr authored
27 if(NOT ${CMAKE_PROJECT_NAME}_USE_GIT_PROTOCOL)
594f932 @jcfr ENH: Simplify and optimize superbuild
jcfr authored
28 set(git_protocol "http")
5028115 @finetjul ENH: Add VTK 6 support 1/2
finetjul authored
29
30 # Verify that the global git config has been updated with the expected "insteadOf" option.
31 function(_check_for_required_git_config_insteadof base insteadof)
32 execute_process(
33 COMMAND ${GIT_EXECUTABLE} config --global --get "url.${base}.insteadof"
34 OUTPUT_VARIABLE output
35 OUTPUT_STRIP_TRAILING_WHITESPACE
36 RESULT_VARIABLE error_code
37 )
38 if(error_code OR NOT "${output}" STREQUAL "${insteadof}")
39 message(FATAL_ERROR
40 "Since the ExternalProject modules doesn't provide a mechanism to customize the clone step by "
41 "adding 'git config' statement between the 'git checkout' and the 'submodule init', it is required "
42 "to manually update your global git config to successfully build ${CMAKE_PROJECT_NAME} with "
43 "option ${CMAKE_PROJECT_NAME}_USE_GIT_PROTOCOL set to FALSE. "
44 "See http://na-mic.org/Mantis/view.php?id=2731"
45 "\nYou could do so by running the command:\n"
46 " ${GIT_EXECUTABLE} config --global url.\"${base}\".insteadOf \"${insteadof}\"\n")
47 endif()
48 endfunction()
49
50 if("${ITK_VERSION_MAJOR}" LESS 4)
51 _check_for_required_git_config_insteadof("http://itk.org/" "git://itk.org/")
52 endif()
53
594f932 @jcfr ENH: Simplify and optimize superbuild
jcfr authored
54 endif()
55
56 #-----------------------------------------------------------------------------
57 # Enable and setup External project global properties
58 #-----------------------------------------------------------------------------
a4bf7db @jcfr COMP: Fix Windows build ensuring CMAKE_CONFIGURATION_TYPES is properl…
jcfr authored
59
73d5d9e @jcfr STYLE: Move CMake commands to match new conventions
jcfr authored
60 set(ep_common_c_flags "${CMAKE_C_FLAGS_INIT} ${ADDITIONAL_C_FLAGS}")
61 set(ep_common_cxx_flags "${CMAKE_CXX_FLAGS_INIT} ${ADDITIONAL_CXX_FLAGS}")
018553b COMP: When building 64-bit on Windows we need to compile with /bigobj…
partyd authored
62
bbc5e1f @jcfr COMP: Simplify external project includes & passing of CMake vars to p…
jcfr authored
63 #-----------------------------------------------------------------------------
64 # Define list of additional options used to configure Slicer
65 #------------------------------------------------------------------------------
66
67 if(DEFINED CTEST_CONFIGURATION_TYPE)
68 mark_as_superbuild(CTEST_CONFIGURATION_TYPE)
594f932 @jcfr ENH: Simplify and optimize superbuild
jcfr authored
69 endif()
70
bbc5e1f @jcfr COMP: Simplify external project includes & passing of CMake vars to p…
jcfr authored
71 if(DEFINED CMAKE_CONFIGURATION_TYPES)
72 mark_as_superbuild(CMAKE_CONFIGURATION_TYPES)
73 endif()
74
75 # Provide a mechanism to disable one or more modules.
76 mark_as_superbuild(
77 Slicer_QTLOADABLEMODULES_DISABLED:STRING
78 Slicer_QTSCRIPTEDMODULES_DISABLED:STRING
79 Slicer_CLIMODULES_DISABLED:STRING
80 )
81
594f932 @jcfr ENH: Simplify and optimize superbuild
jcfr authored
82 #------------------------------------------------------------------------------
0de99b3 @jcfr COMP: Superbuild.cmake - Update comment and definition of Slicer_DEP…
jcfr authored
83 # Slicer dependency list
594f932 @jcfr ENH: Simplify and optimize superbuild
jcfr authored
84 #------------------------------------------------------------------------------
eecd35a ENH: Add option to build slicer with ITKv4.
hjohnson authored
85
a44f908 @jcfr ENH: Remove ITKv3 support
jcfr authored
86 set(ITK_EXTERNAL_NAME ITKv4)
eecd35a ENH: Add option to build slicer with ITKv4.
hjohnson authored
87
90b5092 @finetjul ENH: Add VTK 6 support 2/2
finetjul authored
88 set(VTK_EXTERNAL_NAME VTKv${VTK_VERSION_MAJOR})
89
90 set(Slicer_DEPENDENCIES curl teem ${VTK_EXTERNAL_NAME} ${ITK_EXTERNAL_NAME} CTK LibArchive)
8c5fd77 @jcfr COMP: Support Slicer_USE_SYSTEM_* option. Fixes #1739
jcfr authored
91
92 set(CURL_ENABLE_SSL ${Slicer_USE_PYTHONQT_WITH_OPENSSL})
28c0ff3 COMP: Set BRAINSTools building for ITKv3 and ITKv4
hjohnson authored
93
c9a6923 @jcfr COMP: OpenIGTLink external project is disabled by default
jcfr authored
94 if(Slicer_USE_OpenIGTLink)
95 list(APPEND Slicer_DEPENDENCIES OpenIGTLink)
96 endif()
ed6a742 @jcfr COMP: Simplify how external project options and list of dependencies …
jcfr authored
97
98 if(Slicer_USE_SimpleITK)
99 list(APPEND Slicer_DEPENDENCIES SimpleITK)
100 endif()
101
98669ca @jcfr COMP: Add Slicer_BUILD_CLI_SUPPORT
jcfr authored
102 if(Slicer_BUILD_CLI_SUPPORT)
103 list(APPEND Slicer_DEPENDENCIES SlicerExecutionModel)
6ddaa11 @jcfr COMP: Add advanced option to disable/enable the building of ChangeTra…
jcfr authored
104 endif()
ed6a742 @jcfr COMP: Simplify how external project options and list of dependencies …
jcfr authored
105
26b47b3 @jcfr ENH: Add Slicer_BUILD_EXTENSIONMANAGER_SUPPORT option
jcfr authored
106 if(Slicer_BUILD_EXTENSIONMANAGER_SUPPORT)
dce4ae0 @jcfr COMP: Use qRestAPI instead of deprecated qMidasAPI project
jcfr authored
107 list(APPEND Slicer_DEPENDENCIES qRestAPI)
26b47b3 @jcfr ENH: Add Slicer_BUILD_EXTENSIONMANAGER_SUPPORT option
jcfr authored
108 endif()
ed6a742 @jcfr COMP: Simplify how external project options and list of dependencies …
jcfr authored
109
223acbb @jcfr COMP: Honor option Slicer_BUILD_DICOM_SUPPORT by conditionally buildi…
jcfr authored
110 if(Slicer_BUILD_DICOM_SUPPORT)
111 list(APPEND Slicer_DEPENDENCIES DCMTK)
112 endif()
113
f21ed6c @pieper ENH: Add 'pydicom' python module as external project.
pieper authored
114 if(Slicer_BUILD_DICOM_SUPPORT AND Slicer_USE_PYTHONQT_WITH_OPENSSL)
bff8039 @jcfr STYLE: Add "python-" prefix to GitPython, Github and pydicom module
jcfr authored
115 list(APPEND Slicer_DEPENDENCIES python-pydicom)
f21ed6c @pieper ENH: Add 'pydicom' python module as external project.
pieper authored
116 endif()
117
7b00aa2 @jcfr COMP: Do not package GitPython and PyGithub test directories. Fixes #…
jcfr authored
118 if(Slicer_USE_PYTHONQT AND Slicer_BUILD_EXTENSIONMANAGER_SUPPORT)
bff8039 @jcfr STYLE: Add "python-" prefix to GitPython, Github and pydicom module
jcfr authored
119 list(APPEND Slicer_DEPENDENCIES python-GitPython python-chardet)
6eebeb1 ENH: Add GitPython and PyGithub external projects
mwoehlke authored
120 if(Slicer_USE_PYTHONQT_WITH_OPENSSL OR Slicer_USE_SYSTEM_python)
bff8039 @jcfr STYLE: Add "python-" prefix to GitPython, Github and pydicom module
jcfr authored
121 # python-PyGithub requires SSL support in Python
122 list(APPEND Slicer_DEPENDENCIES python-PyGithub)
6eebeb1 ENH: Add GitPython and PyGithub external projects
mwoehlke authored
123 else()
2d27467 @jcfr ENH: Enable SSL support by default.
jcfr authored
124 message(STATUS "--------------------------------------------------")
125 message(STATUS "Python was built without SSL support; "
126 "github integration will not be available. "
127 "Set Slicer_USE_PYTHONQT_WITH_OPENSSL=ON to enable this feature.")
128 message(STATUS "--------------------------------------------------")
6eebeb1 ENH: Add GitPython and PyGithub external projects
mwoehlke authored
129 endif()
130 endif()
131
ed6a742 @jcfr COMP: Simplify how external project options and list of dependencies …
jcfr authored
132 if(Slicer_USE_CTKAPPLAUNCHER)
cadcc96 @jcfr COMP: Dependencies of each external project are now specified in thei…
jcfr authored
133 list(APPEND Slicer_DEPENDENCIES CTKAPPLAUNCHER)
594f932 @jcfr ENH: Simplify and optimize superbuild
jcfr authored
134 endif()
ed6a742 @jcfr COMP: Simplify how external project options and list of dependencies …
jcfr authored
135
fbabbf3 @jcfr COMP: Remove ref to KWWidgets, Slicer_USE_PYTHON, Slicer_BUILD_MODULE…
jcfr authored
136 if(Slicer_USE_PYTHONQT)
897bf9e @jcfr ENH: Add SSL support
jcfr authored
137 set(PYTHON_ENABLE_SSL ${Slicer_USE_PYTHONQT_WITH_OPENSSL})
cadcc96 @jcfr COMP: Dependencies of each external project are now specified in thei…
jcfr authored
138 list(APPEND Slicer_DEPENDENCIES python)
594f932 @jcfr ENH: Simplify and optimize superbuild
jcfr authored
139 endif()
140
ed6a742 @jcfr COMP: Simplify how external project options and list of dependencies …
jcfr authored
141 if(Slicer_USE_NUMPY)
142 list(APPEND Slicer_DEPENDENCIES NUMPY)
143 endif()
144
145 if(Slicer_USE_PYTHONQT_WITH_TCL AND UNIX)
146 list(APPEND Slicer_DEPENDENCIES incrTcl)
147 endif()
148
8af1347 @finetjul ENH: Add support for external projects passed as configuration parameter
finetjul authored
149 if(DEFINED Slicer_ADDITIONAL_DEPENDENCIES)
150 list(APPEND Slicer_DEPENDENCIES ${Slicer_ADDITIONAL_DEPENDENCIES})
151 endif()
152
bbc5e1f @jcfr COMP: Simplify external project includes & passing of CMake vars to p…
jcfr authored
153 mark_as_superbuild(Slicer_DEPENDENCIES:STRING)
594f932 @jcfr ENH: Simplify and optimize superbuild
jcfr authored
154
bb38caf @jcfr COMP: Easier maintenance simplifying process to add remote module source
jcfr authored
155 #------------------------------------------------------------------------------
156 # Include remote modules
157 #------------------------------------------------------------------------------
158 include(ExternalProjectAddSource)
159
160 macro(list_conditional_append cond list)
161 if(${cond})
162 list(APPEND ${list} ${ARGN})
163 endif()
164 endmacro()
165
166 Slicer_Remote_Add(jqPlot
167 URL http://slicer.kitware.com/midas3/download?items=15065&dummy=jquery.jqplot.1.0.4r1120.tar.gz
168 URL_MD5 5c5d73730145c3963f09e1d3ca355580
169 SOURCE_DIR_VAR jqPlot_DIR
170 LABELS FIND_PACKAGE
171 )
172 list(APPEND Slicer_REMOTE_DEPENDENCIES jqPlot)
173
174 Slicer_Remote_Add(OpenIGTLinkIF
90b5092 @finetjul ENH: Add VTK 6 support 2/2
finetjul authored
175 GIT_REPOSITORY ${git_protocol}://github.com/openigtlink/OpenIGTLinkIF.git
31eaf40 BUG: Updated OpenIGTLinkIF
lassoan authored
176 GIT_TAG da36e864503e16284c028944946c330041e1a738
bb38caf @jcfr COMP: Easier maintenance simplifying process to add remote module source
jcfr authored
177 OPTION_NAME Slicer_BUILD_OpenIGTLinkIF
178 OPTION_DEPENDS "Slicer_BUILD_QTLOADABLEMODULES;Slicer_USE_OpenIGTLink"
179 LABELS REMOTE_MODULE
180 )
181 list_conditional_append(Slicer_BUILD_OpenIGTLinkIF Slicer_REMOTE_DEPENDENCIES OpenIGTLinkIF)
182
183 option(Slicer_BUILD_MULTIVOLUME_SUPPORT "Build MultiVolume support." ON)
184 mark_as_advanced(Slicer_BUILD_MULTIVOLUME_SUPPORT)
185
186 Slicer_Remote_Add(MultiVolumeExplorer
90b5092 @finetjul ENH: Add VTK 6 support 2/2
finetjul authored
187 GIT_REPOSITORY ${git_protocol}://github.com/fedorov/MultiVolumeExplorer.git
5a4abcf BUG: fix static charting
fedorov authored
188 GIT_TAG dbdab6e4ae9b54c93fb611bc6085db729b26c71c
bb38caf @jcfr COMP: Easier maintenance simplifying process to add remote module source
jcfr authored
189 OPTION_NAME Slicer_BUILD_MultiVolumeExplorer
190 OPTION_DEPENDS "Slicer_BUILD_QTLOADABLEMODULES;Slicer_BUILD_MULTIVOLUME_SUPPORT;Slicer_USE_PYTHONQT"
191 LABELS REMOTE_MODULE
192 )
193 list_conditional_append(Slicer_BUILD_MultiVolumeExplorer Slicer_REMOTE_DEPENDENCIES MultiVolumeExplorer)
194
195 Slicer_Remote_Add(MultiVolumeImporter
196 GIT_REPOSITORY ${git_protocol}://github.com/fedorov/MultiVolumeImporter.git
f87dc87 ENH: update MultiVolumeImporter
fedorov authored
197 GIT_TAG 8b6d1ce8f47d9b7695e153a63ea9bdb9366a0b6f
bb38caf @jcfr COMP: Easier maintenance simplifying process to add remote module source
jcfr authored
198 OPTION_NAME Slicer_BUILD_MultiVolumeImporter
199 OPTION_DEPENDS "Slicer_BUILD_QTLOADABLEMODULES;Slicer_BUILD_MULTIVOLUME_SUPPORT;Slicer_USE_PYTHONQT"
200 LABELS REMOTE_MODULE
201 )
202 list_conditional_append(Slicer_BUILD_MultiVolumeImporter Slicer_REMOTE_DEPENDENCIES MultiVolumeImporter)
203
204 Slicer_Remote_Add(SimpleFilters
205 GIT_REPOSITORY ${git_protocol}://github.com/SimpleITK/SlicerSimpleFilters.git
be13ced @jcfr BUG: Update SimpleFilters to fix failing py_SimpleFiltersModuleTest
jcfr authored
206 GIT_TAG 73add6b2046af693a063196237c105f1b6632251
bb38caf @jcfr COMP: Easier maintenance simplifying process to add remote module source
jcfr authored
207 OPTION_NAME Slicer_BUILD_SimpleFilters
208 OPTION_DEPENDS "Slicer_BUILD_QTSCRIPTEDMODULES;Slicer_USE_SimpleITK"
209 LABELS REMOTE_MODULE
210 )
211 list_conditional_append(Slicer_BUILD_SimpleFilters Slicer_REMOTE_DEPENDENCIES SimpleFilters)
212
2bd7dc4 @jcfr COMP: Simplify how BRAINSTools project options are specified
jcfr authored
213 set(BRAINSTools_options
214 BRAINSTools_SUPERBUILD:BOOL=OFF
215 BRAINSTools_CLI_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_BINARY_DIR}/${Slicer_BINARY_INNER_SUBDIR}/${Slicer_CLIMODULES_LIB_DIR}
216 BRAINSTools_CLI_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_BINARY_DIR}/${Slicer_BINARY_INNER_SUBDIR}/${Slicer_CLIMODULES_LIB_DIR}
217 BRAINSTools_CLI_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_BINARY_DIR}/${Slicer_BINARY_INNER_SUBDIR}/${Slicer_CLIMODULES_BIN_DIR}
218 BRAINSTools_CLI_INSTALL_LIBRARY_DESTINATION:PATH=${Slicer_INSTALL_CLIMODULES_LIB_DIR}
219 BRAINSTools_CLI_INSTALL_ARCHIVE_DESTINATION:PATH=${Slicer_INSTALL_CLIMODULES_LIB_DIR}
220 BRAINSTools_CLI_INSTALL_RUNTIME_DESTINATION:PATH=${Slicer_INSTALL_CLIMODULES_BIN_DIR}
221 USE_BRAINSFit:BOOL=ON
222 USE_BRAINSROIAuto:BOOL=ON
223 USE_BRAINSResample:BOOL=ON
224 USE_BRAINSDemonWarp:BOOL=ON
225 # BRAINSTools comes with some extra tool that should not be compiled by default
226 USE_AutoWorkup:BOOL=OFF
b1359c7 @jcfr COMP: Provide Updates to BRAINSFit and DWIConvert
jcfr authored
227 USE_ReferenceAtlas:BOOL=OFF
2bd7dc4 @jcfr COMP: Simplify how BRAINSTools project options are specified
jcfr authored
228 USE_ANTS:BOOL=OFF
229 USE_GTRACT:BOOL=OFF
230 USE_BRAINSABC:BOOL=OFF
231 USE_BRAINSTalairach:BOOL=OFF
232 USE_BRAINSConstellationDetector:BOOL=OFF
233 USE_BRAINSMush:BOOL=OFF
234 USE_BRAINSInitializedControlPoints:BOOL=OFF
235 USE_BRAINSMultiModeSegment:BOOL=OFF
236 USE_BRAINSCut:BOOL=OFF
237 USE_BRAINSLandmarkInitializer:BOOL=OFF
238 USE_ImageCalculator:BOOL=OFF
239 USE_BRAINSSurfaceTools:BOOL=OFF
240 USE_BRAINSSnapShotWriter:BOOL=OFF
241 USE_ConvertBetweenFileFormats:BOOL=OFF
242 USE_BRAINSMultiSTAPLE:BOOL=OFF
243 USE_BRAINSCreateLabelMapFromProbabilityMaps:BOOL=OFF
244 USE_BRAINSContinuousClass:BOOL=OFF
245 USE_ICCDEF:BOOL=OFF
246 USE_BRAINSPosteriorToContinuousClass:BOOL=OFF
247 USE_DebugImageViewer:BOOL=OFF
248 BRAINS_DEBUG_IMAGE_WRITE:BOOL=OFF
a44f908 @jcfr ENH: Remove ITKv3 support
jcfr authored
249 USE_BRAINSTransformConvert:BOOL=ON
250 USE_DWIConvert:BOOL=${Slicer_BUILD_DICOM_SUPPORT} ## Need to figure out library linking
2bd7dc4 @jcfr COMP: Simplify how BRAINSTools project options are specified
jcfr authored
251 )
bb38caf @jcfr COMP: Easier maintenance simplifying process to add remote module source
jcfr authored
252 Slicer_Remote_Add(BRAINSTools
3909077 @jcfr BUG: Partial fix for EMSegment/BRAINSFit integration. See #3561, #274…
jcfr authored
253 GIT_REPOSITORY "${git_protocol}://github.com/Slicer/BRAINSTools.git"
59dde26 @jcfr COMP: Update BRAINSTools to fix windows build error
jcfr authored
254 GIT_TAG "0dd3268d7a0c117732bf24b4a099ba3d1bf02f8b"
bb38caf @jcfr COMP: Easier maintenance simplifying process to add remote module source
jcfr authored
255 OPTION_NAME Slicer_BUILD_BRAINSTOOLS
256 OPTION_DEPENDS "Slicer_BUILD_CLI_SUPPORT;Slicer_BUILD_CLI"
2bd7dc4 @jcfr COMP: Simplify how BRAINSTools project options are specified
jcfr authored
257 LABELS REMOTE_MODULE
258 VARS ${BRAINSTools_options}
bb38caf @jcfr COMP: Easier maintenance simplifying process to add remote module source
jcfr authored
259 )
260 list_conditional_append(Slicer_BUILD_BRAINSTOOLS Slicer_REMOTE_DEPENDENCIES BRAINSTools)
261
262 Slicer_Remote_Add(EMSegment
3558d0b @jcfr ENH: Associate a component with install rules
jcfr authored
263 SVN_REPOSITORY "http://svn.slicer.org/Slicer3/branches/Slicer4-EMSegment"
05628f0 BUG: took out class 10 as the structure shown inside the probability …
pohl authored
264 SVN_REVISION -r "17099"
bb38caf @jcfr COMP: Easier maintenance simplifying process to add remote module source
jcfr authored
265 OPTION_NAME Slicer_BUILD_EMSegment
266 OPTION_DEPENDS "Slicer_BUILD_BRAINSTOOLS;Slicer_BUILD_QTLOADABLEMODULES;Slicer_USE_PYTHONQT_WITH_TCL"
267 LABELS REMOTE_MODULE
268 )
269 list_conditional_append(Slicer_BUILD_EMSegment Slicer_REMOTE_DEPENDENCIES EMSegment)
270
19d9e8e @jcfr BUG: Legacy module OtsuThresholdImageFilter needed by EMSegment. Issu…
jcfr authored
271 Slicer_Remote_Add(OtsuThresholdImageFilter
272 GIT_REPOSITORY "${git_protocol}://github.com/Slicer/Slicer-OtsuThresholdImageFilter"
94f1055 @jcfr ENH: Improve build targets organization in IDE that support folders
jcfr authored
273 GIT_TAG "5efe4123584016d73147e0b68a9487e64c10a074"
19d9e8e @jcfr BUG: Legacy module OtsuThresholdImageFilter needed by EMSegment. Issu…
jcfr authored
274 OPTION_NAME Slicer_BUILD_OtsuThresholdImageFilter
275 OPTION_DEPENDS "Slicer_BUILD_EMSegment"
276 LABELS REMOTE_MODULE
277 )
278 list_conditional_append(Slicer_BUILD_OtsuThresholdImageFilter Slicer_REMOTE_DEPENDENCIES OtsuThresholdImageFilter)
279
19b6b1a @jcfr COMP: Add DataStore module as remote module.
jcfr authored
280 Slicer_Remote_Add(DataStore
281 GIT_REPOSITORY "${git_protocol}://github.com/Slicer/Slicer-DataStore"
0a7b309 @jcfr COMP: Update Datastore to fix build introduced when trying to fix war…
jcfr authored
282 GIT_TAG "713f1f8c57f9c234462352702df6f889b18eace3"
19b6b1a @jcfr COMP: Add DataStore module as remote module.
jcfr authored
283 OPTION_NAME Slicer_BUILD_DataStore
284 LABELS REMOTE_MODULE
285 )
286 list_conditional_append(Slicer_BUILD_DataStore Slicer_REMOTE_DEPENDENCIES DataStore)
287
e7102b5 @pieper ENH: Add prototype LandmarkRegistration and CompareVolumes modules
pieper authored
288 Slicer_Remote_Add(CompareVolumes
289 GIT_REPOSITORY "${git_protocol}://github.com/pieper/CompareVolumes"
004f4ff @pieper ENH: Update LandmarkRegistration and CompareVolumes
pieper authored
290 GIT_TAG "61198229a065bf8437166c826baee2ddcc0d7f47"
e7102b5 @pieper ENH: Add prototype LandmarkRegistration and CompareVolumes modules
pieper authored
291 OPTION_NAME Slicer_BUILD_CompareVolumes
292 OPTION_DEPENDS "Slicer_USE_PYTHONQT"
293 LABELS REMOTE_MODULE
294 )
295 list_conditional_append(Slicer_BUILD_CompareVolumes Slicer_REMOTE_DEPENDENCIES CompareVolumes)
296
297 Slicer_Remote_Add(LandmarkRegistration
298 GIT_REPOSITORY "${git_protocol}://github.com/pieper/LandmarkRegistration"
170ee5b @jcfr ENH: Update LandmarkRegistration to show warning if plugin failed to …
jcfr authored
299 GIT_TAG "13d7b32ffc0be030256fd3d1b010a0efc18e3bff"
e7102b5 @pieper ENH: Add prototype LandmarkRegistration and CompareVolumes modules
pieper authored
300 OPTION_NAME Slicer_BUILD_LandmarkRegistration
301 OPTION_DEPENDS "Slicer_BUILD_CompareVolumes;Slicer_USE_PYTHONQT"
302 LABELS REMOTE_MODULE
303 )
304 list_conditional_append(Slicer_BUILD_LandmarkRegistration Slicer_REMOTE_DEPENDENCIES LandmarkRegistration)
305
594f932 @jcfr ENH: Simplify and optimize superbuild
jcfr authored
306 #-----------------------------------------------------------------------------
091abad @jcfr COMP: Consistently specify optional external project CMake arguments
jcfr authored
307 # Define list of additional options used to configure Slicer
308 #------------------------------------------------------------------------------
26b47b3 @jcfr ENH: Add Slicer_BUILD_EXTENSIONMANAGER_SUPPORT option
jcfr authored
309
d126a55 @finetjul COMP: Propagate Slicer_ADDITIONAL_DEPENDENCIEs for packaging
finetjul authored
310 # Projects that Slicer needs to download/configure/build/install...
311 list(APPEND Slicer_ADDITIONAL_PROJECTS ${Slicer_ADDITIONAL_DEPENDENCIES})
091abad @jcfr COMP: Consistently specify optional external project CMake arguments
jcfr authored
312 if(Slicer_ADDITIONAL_PROJECTS)
d126a55 @finetjul COMP: Propagate Slicer_ADDITIONAL_DEPENDENCIEs for packaging
finetjul authored
313 list(REMOVE_DUPLICATES Slicer_ADDITIONAL_PROJECTS)
8af1347 @finetjul ENH: Add support for external projects passed as configuration parameter
finetjul authored
314 foreach(additional_project ${Slicer_ADDITIONAL_PROJECTS})
d126a55 @finetjul COMP: Propagate Slicer_ADDITIONAL_DEPENDENCIEs for packaging
finetjul authored
315 # needed to do find_package within Slicer
bbc5e1f @jcfr COMP: Simplify external project includes & passing of CMake vars to p…
jcfr authored
316 mark_as_superbuild(${additional_project}_DIR:PATH)
8af1347 @finetjul ENH: Add support for external projects passed as configuration parameter
finetjul authored
317 endforeach()
bbc5e1f @jcfr COMP: Simplify external project includes & passing of CMake vars to p…
jcfr authored
318 mark_as_superbuild(Slicer_ADDITIONAL_PROJECTS:STRING)
8af1347 @finetjul ENH: Add support for external projects passed as configuration parameter
finetjul authored
319 endif()
320
bbc5e1f @jcfr COMP: Simplify external project includes & passing of CMake vars to p…
jcfr authored
321 include(ListToString)
95fdc96 @jcfr COMP: Pass CMAKE_OSX_* variable to Slicer inner project
jcfr authored
322
bbc5e1f @jcfr COMP: Simplify external project includes & passing of CMake vars to p…
jcfr authored
323 ExternalProject_Include_Dependencies(Slicer DEPENDS_VAR Slicer_DEPENDENCIES)
673354a @jcfr COMP: Fix unused CMake variable warning related to DOCUMENTATION_* va…
jcfr authored
324
bbc5e1f @jcfr COMP: Simplify external project includes & passing of CMake vars to p…
jcfr authored
325 set(EXTERNAL_PROJECT_OPTIONAL_ARGS)
326 if(WIN32)
327 list(APPEND EXTERNAL_PROJECT_OPTIONAL_ARGS -DSlicer_SKIP_ROOT_DIR_MAX_LENGTH_CHECK:BOOL=ON)
5c76398 ENH: Added DWIConvert
hjohnson authored
328 endif()
329
bb38caf @jcfr COMP: Easier maintenance simplifying process to add remote module source
jcfr authored
330
ab4a3e9 @jcfr ENH: Superbuild - Additional option related to optional external proj…
jcfr authored
331 #------------------------------------------------------------------------------
332 # Configure and build Slicer
333 #------------------------------------------------------------------------------
594f932 @jcfr ENH: Simplify and optimize superbuild
jcfr authored
334 set(proj Slicer)
cadcc96 @jcfr COMP: Dependencies of each external project are now specified in thei…
jcfr authored
335
594f932 @jcfr ENH: Simplify and optimize superbuild
jcfr authored
336 ExternalProject_Add(${proj}
bbc5e1f @jcfr COMP: Simplify external project includes & passing of CMake vars to p…
jcfr authored
337 ${${proj}_EP_ARGS}
bb38caf @jcfr COMP: Easier maintenance simplifying process to add remote module source
jcfr authored
338 DEPENDS ${Slicer_DEPENDENCIES} ${Slicer_REMOTE_DEPENDENCIES}
594f932 @jcfr ENH: Simplify and optimize superbuild
jcfr authored
339 SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
33d9a40 @jcfr COMP: Use variable Slicer_BINARY_INNER_SUBDIR instead of hard-coding …
jcfr authored
340 BINARY_DIR ${Slicer_BINARY_INNER_SUBDIR}
bbc5e1f @jcfr COMP: Simplify external project includes & passing of CMake vars to p…
jcfr authored
341 DOWNLOAD_COMMAND ""
57a4885 COMP: The compiler options must be propogated
hjohnson authored
342 UPDATE_COMMAND ""
bbc5e1f @jcfr COMP: Simplify external project includes & passing of CMake vars to p…
jcfr authored
343 CMAKE_CACHE_ARGS
57a4885 COMP: The compiler options must be propogated
hjohnson authored
344 -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
345 -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}
346 -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
347 -DCMAKE_C_FLAGS:STRING=${ep_common_c_flags}
a4880ce @jcfr COMP: Factor out code related to C/CXX flags to that it could be re-u…
jcfr authored
348 -DADDITIONAL_C_FLAGS:STRING=${ADDITIONAL_C_FLAGS}
349 -DADDITIONAL_CXX_FLAGS:STRING=${ADDITIONAL_CXX_FLAGS}
350 -DSlicer_REQUIRED_C_FLAGS:STRING=${Slicer_REQUIRED_C_FLAGS}
351 -DSlicer_REQUIRED_CXX_FLAGS:STRING=${Slicer_REQUIRED_CXX_FLAGS}
594f932 @jcfr ENH: Simplify and optimize superbuild
jcfr authored
352 -DSlicer_SUPERBUILD:BOOL=OFF
aaa37e2 @jcfr ENH: Superbuild - Pass variable Slicer_SUPERBUILD_DIR to Slicer inner…
jcfr authored
353 -DSlicer_SUPERBUILD_DIR:PATH=${Slicer_BINARY_DIR}
41e54aa @finetjul ENH: Make the applications to build customizable
finetjul authored
354 -D${Slicer_MAIN_PROJECT}_APPLICATION_NAME:STRING=${${Slicer_MAIN_PROJECT}_APPLICATION_NAME}
355 -D${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_MAJOR:STRING=${${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_MAJOR}
356 -D${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_MINOR:STRING=${${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_MINOR}
357 -D${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_PATCH:STRING=${${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_PATCH}
358 -D${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_TWEAK:STRING=${${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_TWEAK}
359 -D${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_RC:STRING=${${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_RC}
360 -DSlicer_APPLICATIONS_DIR:PATH=${Slicer_APPLICATIONS_DIR}
defd86d @jcfr ENH: Extensions can now be built with Slicer proper
jcfr authored
361 -DSlicer_EXTENSION_SOURCE_DIRS:STRING=${Slicer_EXTENSION_SOURCE_DIRS}
091abad @jcfr COMP: Consistently specify optional external project CMake arguments
jcfr authored
362 ${EXTERNAL_PROJECT_OPTIONAL_ARGS}
594f932 @jcfr ENH: Simplify and optimize superbuild
jcfr authored
363 INSTALL_COMMAND ""
364 )
73d5d9e @jcfr STYLE: Move CMake commands to match new conventions
jcfr authored
365
e60f49b @jcfr COMP: Unconditionally rebuild "Slicer" inner project.
jcfr authored
366 # This custom external project step forces the build and later
367 # steps to run whenever a top level build is done...
368 ExternalProject_Add_Step(${proj} forcebuild
d7dbd54 BUG: Fix force build for Slicer
mwoehlke authored
369 COMMAND ${CMAKE_COMMAND} -E remove
370 ${CMAKE_CURRENT_BINARY_DIR}/Slicer-prefix/src/Slicer-stamp/Slicer-build
e60f49b @jcfr COMP: Unconditionally rebuild "Slicer" inner project.
jcfr authored
371 COMMENT "Forcing build step for '${proj}'"
d7dbd54 BUG: Fix force build for Slicer
mwoehlke authored
372 DEPENDEES build
e60f49b @jcfr COMP: Unconditionally rebuild "Slicer" inner project.
jcfr authored
373 ALWAYS 1
374 )
375
9f5c61e @jcfr ENH: Add option Slicer_BUILD_EXTENSIONS
jcfr authored
376 #-----------------------------------------------------------------------------
377 # Slicer extensions
378 #-----------------------------------------------------------------------------
6fb7501 @jcfr ENH: Update and improve extension build system
jcfr authored
379 add_subdirectory(Extensions/CMake)
Something went wrong with that request. Please try again.