-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
157 lines (144 loc) · 4.63 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
project(WikiExamples)
# Display type of build
set(_msg "VTKWikiExamples: Building VTKWikiExamples stand-alone")
message(STATUS "${_msg}")
if(VTK_BINARY_DIR)
message(STATUS "${_msg} - no")
else()
message(STATUS "${_msg} - yes")
endif()
# Display build properties
set(_msg "VTKWikiExamples: Setting executables prefix")
message(STATUS "${_msg}")
if(VTK_BINARY_DIR)
set(WIKI "wiki")
message(STATUS "${_msg} - yes [prefix: ${WIKI}]")
else()
set(WIKI "")
message(STATUS "${_msg} - no")
endif()
# Display VTK version
find_package(VTK CONFIG QUIET)
if (NOT VTK_FOUND)
message("Skipping Cube: ${VTK_NOT_FOUND_MESSAGE}")
endif()
if(NOT VTK_BINARY_DIR)
if (VTK_VERSION VERSION_LESS "8.90.0")
include(${VTK_USE_FILE})
endif()
if (NOT VTK_FOUND)
message("Skipping build: ${VTK_NOT_FOUND_MESSAGE}")
return ()
endif()
endif()
if(NOT VTK_RENDERING_BACKEND)
set(VTK_RENDERING_BACKEND OpenGL2) # Support VTK version prior to introduction of rendering backend
endif()
message(STATUS "VTKWikiExamples: VTK VERSION: ${VTK_VERSION}(${VTK_RENDERING_BACKEND})")
#-----------------------------------------------------------------------------
set(CMAKE_MODULE_PATH
${WikiExamples_SOURCE_DIR}/CMake
${CMAKE_MODULE_PATH}
${VTK_CMAKE_DIR}
)
#-----------------------------------------------------------------------------
if (VTK_VERSION VERSION_LESS "8.90.0")
include(WikiModuleConfigLegacy)
if(WikiModuleConfigLegacy_RETURN)
return()
endif()
include(WikiModuleConfig)
endif()
include(WikiOutputDirectories)
include(WikiPlatformSpecificChecks)
include(WikiPolicies)
include(WikiTestingConfig)
include(WikiLoadMacros)
#-----------------------------------------------------------------------------
# Mac specific
if(APPLE)
set(EXECUTABLE_FLAG MACOSX_BUNDLE)
endif()
#-----------------------------------------------------------------------------
add_subdirectory(src/Cxx/Animation)
add_subdirectory(src/Cxx/CompositeData)
if(VTK_USE_MYSQL)
add_subdirectory(src/Cxx/Databases)
endif()
add_subdirectory(src/Cxx/DataStructures)
if(${VTK_VERSION} VERSION_GREATER "6.10")
add_subdirectory(src/Cxx/Developers)
endif()
add_subdirectory(src/Cxx/Filtering)
add_subdirectory(src/Cxx/GeometricObjects)
if(VTK_USE_INFOVIS)
if(VTK_USE_BOOST)
add_subdirectory(src/Cxx/Graphs)
endif()
endif()
add_subdirectory(src/Cxx/Annotation)
add_subdirectory(src/Cxx/ImageData)
add_subdirectory(src/Cxx/Geovis)
add_subdirectory(src/Cxx/HyperTreeGrid)
add_subdirectory(src/Cxx/ImageProcessing)
add_subdirectory(src/Cxx/Images)
add_subdirectory(src/Cxx/ImplicitFunctions)
add_subdirectory(src/Cxx/InfoVis)
add_subdirectory(src/Cxx/Interaction)
add_subdirectory(src/Cxx/IO)
add_subdirectory(src/Cxx/Lighting)
add_subdirectory(src/Cxx/Math)
add_subdirectory(src/Cxx/Medical)
add_subdirectory(src/Cxx/Meshes)
add_subdirectory(src/Cxx/Modelling)
if(VTK_USE_PARALLEL)
add_subdirectory(src/Cxx/Parallel)
endif()
add_subdirectory(src/Cxx/Picking)
add_subdirectory(src/Cxx/Plotting)
add_subdirectory(src/Cxx/PolyData)
add_subdirectory(src/Cxx/Points)
add_subdirectory(src/Cxx/RectilinearGrid)
add_subdirectory(src/Cxx/Remote)
add_subdirectory(src/Cxx/Rendering)
add_subdirectory(src/Cxx/RenderMan)
add_subdirectory(src/Cxx/SimpleOperations)
add_subdirectory(src/Cxx/Shaders)
add_subdirectory(src/Cxx/StructuredGrid)
add_subdirectory(src/Cxx/StructuredPoints)
add_subdirectory(src/Cxx/Texture)
add_subdirectory(src/Cxx/UnstructuredGrid)
add_subdirectory(src/Cxx/Utilities)
add_subdirectory(src/Cxx/Video)
if(VTK_USE_VIEWS)
add_subdirectory(src/Cxx/Views)
endif()
add_subdirectory(src/Cxx/Visualization)
add_subdirectory(src/Cxx/VisualizationAlgorithms)
add_subdirectory(src/Cxx/VolumeRendering)
add_subdirectory(src/Cxx/Widgets)
# add_subdirectory(Python/GeometricObjects)
if(vtkGUISupportQt_LOADED OR TARGET VTK::GUISupportQt)
message(STATUS "VTKWikiExamples: Building Qt examples")
if (VTK_VERSION VERSION_LESS "8.90.0")
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
else()
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
endif()
# We have ui files, this will bring in the macro: qt5_wrap_ui
find_package(Qt5Widgets REQUIRED QUIET)
add_subdirectory(src/Cxx/Qt)
else()
message(STATUS "VTKWikiExamples: Not building Qt examples")
endif()
# Is git lfs installed?
file(READ "${WikiExamples_SOURCE_DIR}/src/Testing/Data/GitLfsInstalled" data)
if (NOT data STREQUAL "GitLfsInstalled")
message(STATUS "VTKWikiExamples: git lfs is not installed. Some tests will not be created.")
else ()
message(STATUS "VTKWikiExamples: git lfs is installed.")
endif()