Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
SuperBuild.cmake
Go to the documentation of this file.
2 
3 #-----------------------------------------------------------------------------
4 # Convenient macro allowing to download a file
5 #-----------------------------------------------------------------------------
6 
7 if(NOT MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL)
8  set(MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL http://mitk.org/download/thirdparty)
9 endif()
10 
11 macro(downloadFile url dest)
12  file(DOWNLOAD ${url} ${dest} STATUS status)
13  list(GET status 0 error_code)
14  list(GET status 1 error_msg)
15  if(error_code)
16  message(FATAL_ERROR "error: Failed to download ${url} - ${error_msg}")
17  endif()
18 endmacro()
19 
20 #-----------------------------------------------------------------------------
21 # MITK Prerequisites
22 #-----------------------------------------------------------------------------
23 
24 if(UNIX AND NOT APPLE)
25 
27 
28  # Check for libxt-dev
29  mitkFunctionCheckPackageHeader(StringDefs.h libxt-dev /usr/include/X11/)
30 
31  # Check for libtiff4-dev
32  mitkFunctionCheckPackageHeader(tiff.h libtiff4-dev)
33 
34  # Check for libwrap0-dev
35  mitkFunctionCheckPackageHeader(tcpd.h libwrap0-dev)
36 
37 endif()
38 
39 # We need a proper patch program. On Linux and MacOS, we assume
40 # that "patch" is available. On Windows, we download patch.exe
41 # if not patch program is found.
42 find_program(PATCH_COMMAND patch)
43 if((NOT PATCH_COMMAND OR NOT EXISTS ${PATCH_COMMAND}) AND WIN32)
44  downloadFile(${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/patch.exe
45  ${CMAKE_CURRENT_BINARY_DIR}/patch.exe)
46  find_program(PATCH_COMMAND patch ${CMAKE_CURRENT_BINARY_DIR})
47 endif()
48 if(NOT PATCH_COMMAND)
49  message(FATAL_ERROR "No patch program found.")
50 endif()
51 
52 #-----------------------------------------------------------------------------
53 # ExternalProjects
54 #-----------------------------------------------------------------------------
55 
56 get_property(external_projects GLOBAL PROPERTY MITK_EXTERNAL_PROJECTS)
57 
58 if(MITK_CTEST_SCRIPT_MODE)
59  # Write a file containing the list of enabled external project targets.
60  # This file can be read by a ctest script to separately build projects.
61  set(SUPERBUILD_TARGETS )
62  foreach(proj ${external_projects})
63  if(MITK_USE_${proj})
64  list(APPEND SUPERBUILD_TARGETS ${proj})
65  endif()
66  endforeach()
67  file(WRITE "${CMAKE_BINARY_DIR}/SuperBuildTargets.cmake" "set(SUPERBUILD_TARGETS ${SUPERBUILD_TARGETS})")
68 endif()
69 
70 # A list of "nice" external projects, playing well together with CMake
71 set(nice_external_projects ${external_projects})
72 list(REMOVE_ITEM nice_external_projects Boost Python)
73 foreach(proj ${nice_external_projects})
74  if(MITK_USE_${proj})
75  set(EXTERNAL_${proj}_DIR "${${proj}_DIR}" CACHE PATH "Path to ${proj} build directory")
76  mark_as_advanced(EXTERNAL_${proj}_DIR)
77  if(EXTERNAL_${proj}_DIR)
78  set(${proj}_DIR ${EXTERNAL_${proj}_DIR})
79  endif()
80  endif()
81 endforeach()
82 
83 set(EXTERNAL_BOOST_ROOT "${BOOST_ROOT}" CACHE PATH "Path to Boost directory")
84 mark_as_advanced(EXTERNAL_BOOST_ROOT)
85 if(EXTERNAL_BOOST_ROOT)
86  set(BOOST_ROOT ${EXTERNAL_BOOST_ROOT})
87 endif()
88 
89 # Setup file for setting custom ctest vars
90 configure_file(
91  CMake/SuperbuildCTestCustom.cmake.in
92  ${MITK_BINARY_DIR}/CTestCustom.cmake
93  @ONLY
94 )
95 
96 if(BUILD_TESTING)
97  set(EXTERNAL_MITK_DATA_DIR "${MITK_DATA_DIR}" CACHE PATH "Path to the MITK data directory")
98  mark_as_advanced(EXTERNAL_MITK_DATA_DIR)
99  if(EXTERNAL_MITK_DATA_DIR)
100  set(MITK_DATA_DIR ${EXTERNAL_MITK_DATA_DIR})
101  endif()
102 endif()
103 
104 #-----------------------------------------------------------------------------
105 # External project settings
106 #-----------------------------------------------------------------------------
107 
108 include(ExternalProject)
109 
110 set(ep_prefix "${CMAKE_BINARY_DIR}/ep")
111 set_property(DIRECTORY PROPERTY EP_PREFIX ${ep_prefix})
112 
113 # Compute -G arg for configuring external projects with the same CMake generator:
114 if(CMAKE_EXTRA_GENERATOR)
115  set(gen "${CMAKE_EXTRA_GENERATOR} - ${CMAKE_GENERATOR}")
116 else()
117  set(gen "${CMAKE_GENERATOR}")
118 endif()
119 
120 # Use this value where semi-colons are needed in ep_add args:
121 set(sep "^^")
122 
123 ##
124 
125 if(MSVC_VERSION)
126  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /bigobj /MP")
127  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj /MP")
128 endif()
129 
130 # This is a workaround for passing linker flags
131 # actually down to the linker invocation
132 set(_cmake_required_flags_orig ${CMAKE_REQUIRED_FLAGS})
133 set(CMAKE_REQUIRED_FLAGS "-Wl,-rpath")
134 mitkFunctionCheckCompilerFlags(${CMAKE_REQUIRED_FLAGS} _has_rpath_flag)
135 set(CMAKE_REQUIRED_FLAGS ${_cmake_required_flags_orig})
136 
137 set(_install_rpath_linkflag )
138 if(_has_rpath_flag)
139  if(APPLE)
140  set(_install_rpath_linkflag "-Wl,-rpath,@loader_path/../lib")
141  else()
142  set(_install_rpath_linkflag "-Wl,-rpath='$ORIGIN/../lib'")
143  endif()
144 endif()
145 
146 set(_install_rpath)
147 if(APPLE)
148  set(_install_rpath "@loader_path/../lib")
149 elseif(UNIX)
150  # this work for libraries as well as executables
151  set(_install_rpath "\$ORIGIN/../lib")
152 endif()
153 
154 set(ep_common_args
155  -DCMAKE_CXX_EXTENSIONS:STRING=${CMAKE_CXX_EXTENSIONS}
156  -DCMAKE_CXX_STANDARD:STRING=${CMAKE_CXX_STANDARD}
157  -DCMAKE_CXX_STANDARD_REQUIRED:BOOL=${CMAKE_CXX_STANDARD_REQUIRED}
158  -DCMAKE_MACOSX_RPATH:BOOL=TRUE
159  "-DCMAKE_INSTALL_RPATH:STRING=${_install_rpath}"
160  -DBUILD_TESTING:BOOL=OFF
161  -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
162  -DBUILD_SHARED_LIBS:BOOL=ON
163  -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
164  -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
165  -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
166  -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
167  "-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} ${MITK_CXX11_FLAG}"
168  #debug flags
169  -DCMAKE_CXX_FLAGS_DEBUG:STRING=${CMAKE_CXX_FLAGS_DEBUG}
170  -DCMAKE_C_FLAGS_DEBUG:STRING=${CMAKE_C_FLAGS_DEBUG}
171  #release flags
172  -DCMAKE_CXX_FLAGS_RELEASE:STRING=${CMAKE_CXX_FLAGS_RELEASE}
173  -DCMAKE_C_FLAGS_RELEASE:STRING=${CMAKE_C_FLAGS_RELEASE}
174  #relwithdebinfo
175  -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
176  -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING=${CMAKE_C_FLAGS_RELWITHDEBINFO}
177  #link flags
178  -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
179  -DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
180  -DCMAKE_MODULE_LINKER_FLAGS:STRING=${CMAKE_MODULE_LINKER_FLAGS}
181 )
182 
183 set(DCMTK_CMAKE_DEBUG_POSTFIX )
184 
185 # python libraries wont work with it
186 if(NOT MITK_USE_Python)
187  list(APPEND ep_common_args -DCMAKE_DEBUG_POSTFIX:STRING=d)
188  set(DCMTK_CMAKE_DEBUG_POSTFIX d)
189 endif()
190 
191 set(ep_common_cache_args
192 )
193 
194 set(ep_common_cache_default_args
195  "-DCMAKE_PREFIX_PATH:PATH=<INSTALL_DIR>;${CMAKE_PREFIX_PATH}"
196  "-DCMAKE_INCLUDE_PATH:PATH=${CMAKE_INCLUDE_PATH}"
197  "-DCMAKE_LIBRARY_PATH:PATH=${CMAKE_LIBRARY_PATH}"
198 )
199 
200 # Pass the CMAKE_OSX variables to external projects
201 if(APPLE)
202  set(MAC_OSX_ARCHITECTURE_ARGS
203  -DCMAKE_OSX_ARCHITECTURES:PATH=${CMAKE_OSX_ARCHITECTURES}
204  -DCMAKE_OSX_DEPLOYMENT_TARGET:PATH=${CMAKE_OSX_DEPLOYMENT_TARGET}
205  -DCMAKE_OSX_SYSROOT:PATH=${CMAKE_OSX_SYSROOT}
206  )
207  set(ep_common_args
208  ${MAC_OSX_ARCHITECTURE_ARGS}
209  ${ep_common_args}
210  )
211 endif()
212 
213 set(mitk_superbuild_ep_args)
214 set(mitk_depends )
215 
216 # Include external projects
217 include(CMakeExternals/MITKData.cmake)
218 foreach(p ${external_projects})
219  include(CMakeExternals/${p}.cmake)
220 
221  list(APPEND mitk_superbuild_ep_args
222  -DMITK_USE_${p}:BOOL=${MITK_USE_${p}}
223  )
224  get_property(_package GLOBAL PROPERTY MITK_${p}_PACKAGE)
225  if(_package)
226  list(APPEND mitk_superbuild_ep_args -D${p}_DIR:PATH=${${p}_DIR})
227  endif()
228 
229  list(APPEND mitk_depends ${${p}_DEPENDS})
230 endforeach()
231 
232 #-----------------------------------------------------------------------------
233 # Set superbuild boolean args
234 #-----------------------------------------------------------------------------
235 
236 set(mitk_cmake_boolean_args
237  BUILD_SHARED_LIBS
238  WITH_COVERAGE
239  BUILD_TESTING
240 
241  MITK_BUILD_ALL_PLUGINS
242  MITK_BUILD_ALL_APPS
243  MITK_BUILD_EXAMPLES
244 
245  MITK_USE_Qt5
246  MITK_USE_Qt5_WebEngine
247  MITK_USE_SYSTEM_Boost
248  MITK_USE_BLUEBERRY
249  MITK_USE_OpenCL
250 
251  MITK_ENABLE_PIC_READER
252  )
253 
254 #-----------------------------------------------------------------------------
255 # Create the final variable containing superbuild boolean args
256 #-----------------------------------------------------------------------------
257 
258 set(mitk_superbuild_boolean_args)
259 foreach(mitk_cmake_arg ${mitk_cmake_boolean_args})
260  list(APPEND mitk_superbuild_boolean_args -D${mitk_cmake_arg}:BOOL=${${mitk_cmake_arg}})
261 endforeach()
262 
263 if(MITK_BUILD_ALL_PLUGINS)
264  list(APPEND mitk_superbuild_boolean_args -DBLUEBERRY_BUILD_ALL_PLUGINS:BOOL=ON)
265 endif()
266 
267 #-----------------------------------------------------------------------------
268 # MITK Utilities
269 #-----------------------------------------------------------------------------
270 
271 set(proj MITK-Utilities)
272 ExternalProject_Add(${proj}
273  DOWNLOAD_COMMAND ""
274  CONFIGURE_COMMAND ""
275  BUILD_COMMAND ""
276  INSTALL_COMMAND ""
277  DEPENDS
278  ${mitk_depends}
279 )
280 #-----------------------------------------------------------------------------
281 # Additional MITK CXX/C Flags
282 #-----------------------------------------------------------------------------
283 
284 set(MITK_ADDITIONAL_C_FLAGS "" CACHE STRING "Additional C Flags for MITK")
285 set(MITK_ADDITIONAL_C_FLAGS_RELEASE "" CACHE STRING "Additional Release C Flags for MITK")
286 set(MITK_ADDITIONAL_C_FLAGS_DEBUG "" CACHE STRING "Additional Debug C Flags for MITK")
287 mark_as_advanced(MITK_ADDITIONAL_C_FLAGS MITK_ADDITIONAL_C_FLAGS_DEBUG MITK_ADDITIONAL_C_FLAGS_RELEASE)
288 
289 set(MITK_ADDITIONAL_CXX_FLAGS "" CACHE STRING "Additional CXX Flags for MITK")
290 set(MITK_ADDITIONAL_CXX_FLAGS_RELEASE "" CACHE STRING "Additional Release CXX Flags for MITK")
291 set(MITK_ADDITIONAL_CXX_FLAGS_DEBUG "" CACHE STRING "Additional Debug CXX Flags for MITK")
292 mark_as_advanced(MITK_ADDITIONAL_CXX_FLAGS MITK_ADDITIONAL_CXX_FLAGS_DEBUG MITK_ADDITIONAL_CXX_FLAGS_RELEASE)
293 
294 set(MITK_ADDITIONAL_EXE_LINKER_FLAGS "" CACHE STRING "Additional exe linker flags for MITK")
295 set(MITK_ADDITIONAL_SHARED_LINKER_FLAGS "" CACHE STRING "Additional shared linker flags for MITK")
296 set(MITK_ADDITIONAL_MODULE_LINKER_FLAGS "" CACHE STRING "Additional module linker flags for MITK")
297 mark_as_advanced(MITK_ADDITIONAL_EXE_LINKER_FLAGS MITK_ADDITIONAL_SHARED_LINKER_FLAGS MITK_ADDITIONAL_MODULE_LINKER_FLAGS)
298 
299 #-----------------------------------------------------------------------------
300 # MITK Configure
301 #-----------------------------------------------------------------------------
302 
303 if(MITK_INITIAL_CACHE_FILE)
304  set(mitk_initial_cache_arg -C "${MITK_INITIAL_CACHE_FILE}")
305 endif()
306 
307 set(mitk_optional_cache_args )
308 foreach(type RUNTIME ARCHIVE LIBRARY)
309  if(DEFINED CTK_PLUGIN_${type}_OUTPUT_DIRECTORY)
310  list(APPEND mitk_optional_cache_args -DCTK_PLUGIN_${type}_OUTPUT_DIRECTORY:PATH=${CTK_PLUGIN_${type}_OUTPUT_DIRECTORY})
311  endif()
312 endforeach()
313 
314 # Optional python variables
315 if(MITK_USE_Python)
316  list(APPEND mitk_optional_cache_args
317  -DMITK_USE_Python:BOOL=${MITK_USE_Python}
318  -DPYTHON_EXECUTABLE:FILEPATH=${PYTHON_EXECUTABLE}
319  -DPYTHON_INCLUDE_DIR:PATH=${PYTHON_INCLUDE_DIR}
320  -DPYTHON_LIBRARY:FILEPATH=${PYTHON_LIBRARY}
321  -DPYTHON_INCLUDE_DIR2:PATH=${PYTHON_INCLUDE_DIR2}
322  -DMITK_USE_SYSTEM_PYTHON:BOOL=${MITK_USE_SYSTEM_PYTHON}
323  )
324 endif()
325 
326 set(proj MITK-Configure)
327 
328 ExternalProject_Add(${proj}
329  LIST_SEPARATOR ${sep}
330  DOWNLOAD_COMMAND ""
331  CMAKE_GENERATOR ${gen}
332  CMAKE_CACHE_ARGS
333  # --------------- Build options ----------------
334  -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
335  -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
336  "-DCMAKE_PREFIX_PATH:PATH=${ep_prefix};${CMAKE_PREFIX_PATH}"
337  "-DCMAKE_LIBRARY_PATH:PATH=${CMAKE_LIBRARY_PATH}"
338  "-DCMAKE_INCLUDE_PATH:PATH=${CMAKE_INCLUDE_PATH}"
339  # --------------- Compile options ----------------
340  -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
341  -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
342  "-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS} ${MITK_ADDITIONAL_C_FLAGS}"
343  "-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} ${MITK_ADDITIONAL_CXX_FLAGS}"
344  # debug flags
345  "-DCMAKE_CXX_FLAGS_DEBUG:STRING=${CMAKE_CXX_FLAGS_DEBUG} ${MITK_ADDITIONAL_CXX_FLAGS_DEBUG}"
346  "-DCMAKE_C_FLAGS_DEBUG:STRING=${CMAKE_C_FLAGS_DEBUG} ${MITK_ADDITIONAL_C_FLAGS_DEBUG}"
347  # release flags
348  "-DCMAKE_CXX_FLAGS_RELEASE:STRING=${CMAKE_CXX_FLAGS_RELEASE} ${MITK_ADDITIONAL_CXX_FLAGS_RELEASE}"
349  "-DCMAKE_C_FLAGS_RELEASE:STRING=${CMAKE_C_FLAGS_RELEASE} ${MITK_ADDITIONAL_C_FLAGS_RELEASE}"
350  # relwithdebinfo
351  -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
352  -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING=${CMAKE_C_FLAGS_RELWITHDEBINFO}
353  # link flags
354  "-DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS} ${MITK_ADDITIONAL_EXE_LINKER_FLAGS}"
355  "-DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS} ${MITK_ADDITIONAL_SHARED_LINKER_FLAGS}"
356  "-DCMAKE_MODULE_LINKER_FLAGS:STRING=${CMAKE_MODULE_LINKER_FLAGS} ${MITK_ADDITIONAL_MODULE_LINKER_FLAGS}"
357  # Output directories
358  -DMITK_CMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${MITK_CMAKE_LIBRARY_OUTPUT_DIRECTORY}
359  -DMITK_CMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${MITK_CMAKE_RUNTIME_OUTPUT_DIRECTORY}
360  -DMITK_CMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${MITK_CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
361  # ------------- Boolean build options --------------
362  ${mitk_superbuild_boolean_args}
363  ${mitk_optional_cache_args}
364  -DMITK_USE_SUPERBUILD:BOOL=OFF
365  -DMITK_BUILD_CONFIGURATION:STRING=${MITK_BUILD_CONFIGURATION}
366  -DCTEST_USE_LAUNCHERS:BOOL=${CTEST_USE_LAUNCHERS}
367  # ----------------- Miscellaneous ---------------
368  -DCMAKE_LIBRARY_PATH:PATH=${CMAKE_LIBRARY_PATH}
369  -DCMAKE_INCLUDE_PATH:PATH=${CMAKE_INCLUDE_PATH}
370  -DMITK_CTEST_SCRIPT_MODE:STRING=${MITK_CTEST_SCRIPT_MODE}
371  -DMITK_SUPERBUILD_BINARY_DIR:PATH=${MITK_BINARY_DIR}
372  -DMITK_MODULES_TO_BUILD:INTERNAL=${MITK_MODULES_TO_BUILD}
373  -DMITK_WHITELIST:STRING=${MITK_WHITELIST}
374  -DMITK_WHITELISTS_EXTERNAL_PATH:STRING=${MITK_WHITELISTS_EXTERNAL_PATH}
375  -DMITK_WHITELISTS_INTERNAL_PATH:STRING=${MITK_WHITELISTS_INTERNAL_PATH}
376  -DMITK_ACCESSBYITK_INTEGRAL_PIXEL_TYPES:STRING=${MITK_ACCESSBYITK_INTEGRAL_PIXEL_TYPES}
377  -DMITK_ACCESSBYITK_FLOATING_PIXEL_TYPES:STRING=${MITK_ACCESSBYITK_FLOATING_PIXEL_TYPES}
378  -DMITK_ACCESSBYITK_COMPOSITE_PIXEL_TYPES:STRING=${MITK_ACCESSBYITK_COMPOSITE_PIXEL_TYPES}
379  -DMITK_ACCESSBYITK_VECTOR_PIXEL_TYPES:STRING=${MITK_ACCESSBYITK_VECTOR_PIXEL_TYPES}
380  -DMITK_ACCESSBYITK_DIMENSIONS:STRING=${MITK_ACCESSBYITK_DIMENSIONS}
381  # --------------- External project options ---------------
382  -DMITK_DATA_DIR:PATH=${MITK_DATA_DIR}
383  -DMITK_EXTERNAL_PROJECT_PREFIX:PATH=${ep_prefix}
384  -DCppMicroServices_DIR:PATH=${CppMicroServices_DIR}
385  -DMITK_KWSTYLE_EXECUTABLE:FILEPATH=${MITK_KWSTYLE_EXECUTABLE}
386  -DDCMTK_CMAKE_DEBUG_POSTFIX:STRING=${DCMTK_CMAKE_DEBUG_POSTFIX}
387  -DBOOST_ROOT:PATH=${BOOST_ROOT}
388  -DBOOST_LIBRARYDIR:PATH=${BOOST_LIBRARYDIR}
389  -DMITK_USE_Boost_LIBRARIES:STRING=${MITK_USE_Boost_LIBRARIES}
390  CMAKE_ARGS
391  ${mitk_initial_cache_arg}
392  ${MAC_OSX_ARCHITECTURE_ARGS}
393  ${mitk_superbuild_ep_args}
394  SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
395  BINARY_DIR ${CMAKE_BINARY_DIR}/MITK-build
396  BUILD_COMMAND ""
397  INSTALL_COMMAND ""
398  DEPENDS
399  MITK-Utilities
400  )
401 
402 mitkFunctionInstallExternalCMakeProject(${proj})
403 
404 #-----------------------------------------------------------------------------
405 # MITK
406 #-----------------------------------------------------------------------------
407 
408 if(CMAKE_GENERATOR MATCHES ".*Makefiles.*")
409  set(mitk_build_cmd "$(MAKE)")
410 else()
411  set(mitk_build_cmd ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/MITK-build --config ${CMAKE_CFG_INTDIR})
412 endif()
413 
414 if(NOT DEFINED SUPERBUILD_EXCLUDE_MITKBUILD_TARGET OR NOT SUPERBUILD_EXCLUDE_MITKBUILD_TARGET)
415  set(MITKBUILD_TARGET_ALL_OPTION "ALL")
416 else()
417  set(MITKBUILD_TARGET_ALL_OPTION "")
418 endif()
419 
420 add_custom_target(MITK-build ${MITKBUILD_TARGET_ALL_OPTION}
421  COMMAND ${mitk_build_cmd}
422  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/MITK-build
423  DEPENDS MITK-Configure
424  )
425 
426 #-----------------------------------------------------------------------------
427 # Custom target allowing to drive the build of the MITK project itself
428 #-----------------------------------------------------------------------------
429 
430 add_custom_target(MITK
431  COMMAND ${mitk_build_cmd}
432  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/MITK-build
433 )
434 
#define MITK_DATA_DIR
mitkFunctionCheckPackageHeader(_header, _provider)
section MAP_FRAME_Mapper_Settings Mapper settings For the mapping of corrected you have several settings available
downloadFile(url, dest)
mitkFunctionInstallExternalCMakeProject(ep_name)