-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathSuperBuildPrerequisites.cmake
50 lines (39 loc) · 1.67 KB
/
SuperBuildPrerequisites.cmake
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
if(DEFINED slicersources_SOURCE_DIR AND NOT DEFINED Slicer_SOURCE_DIR)
# Explicitly setting "Slicer_SOURCE_DIR" when only "slicersources_SOURCE_DIR"
# is defined is required to successfully complete configuration in an empty
# build directory
#
# Indeed, in that case, Slicer sources have been downloaded by they have not been
# added using "add_subdirectory()" and the variable "Slicer_SOURCE_DIR" is not yet in
# in the CACHE.
set(Slicer_SOURCE_DIR ${slicersources_SOURCE_DIR})
endif()
# Download VTKExternalModule and set variable VTKExternalModule_SOURCE_DIR.
include(${SlicerLookingGlass_SOURCE_DIR}/FetchVTKExternalModule.cmake)
# Download vtkRenderingLookingGlass sources and set variable vtkRenderingLookingGlass_SOURCE_DIR.
include(${SlicerLookingGlass_SOURCE_DIR}/FetchVTKRenderingLookingGlass.cmake)
if(NOT EXISTS "${vtkRenderingLookingGlass_SOURCE_DIR}")
message(FATAL_ERROR "vtkRenderingLookingGlass_SOURCE_DIR [${vtkRenderingLookingGlass_SOURCE_DIR}] variable is corresponds to nonexistent directory")
endif()
# Download HoloPlayCore and set variables HoloPlayCore_INCLUDE_DIR, HoloPlayCore_LIBRARY
# and HoloPlayCore_RUNTIME_LIBRARY.
include(${vtkRenderingLookingGlass_SOURCE_DIR}/FetchHoloPlayCore.cmake)
mark_as_superbuild(
VARS
HoloPlayCore_INCLUDE_DIR:PATH
HoloPlayCore_LIBRARY:FILEPATH
HoloPlayCore_RUNTIME_LIBRARY:FILEPATH
)
if(NOT DEFINED Slicer_SOURCE_DIR)
# Extension is built standalone
# NA
else()
# Extension is bundled in a custom application
# Additional external project dependencies
ExternalProject_Add_Dependencies(vtkRenderingLookingGlass
DEPENDS
VTK
)
# Additional external project options
# NA
endif()