forked from lorensen/VTKExamples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
140 lines (129 loc) · 4.61 KB
/
CMakeLists.txt
File metadata and controls
140 lines (129 loc) · 4.61 KB
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
cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)
if (POLICY CMP0057)
cmake_policy(SET CMP0057 NEW)
endif()
PROJECT(WikiExamples)
if (Module_WikiExamples)
message(STATUS "VTKWikiExamples: Building VTKWikiExamples as a Remote VTK Module")
message(STATUS "VTKWikiExamples: All executables will have a \"wiki\" prefix")
set(WIKI wiki)
vtk_module_impl()
if(NOT EXISTS "${VTK_BINARY_DIR}/VTKConfig.cmake")
return()
endif()
find_package(VTK PATHS ${VTK_BINARY_DIR})
include(${VTK_USE_FILE})
else()
message(STATUS "VTKWikiExamples: Building VTKWikiExamples stand-alone")
# See if VTK is using OpenGL or OpenGL2
find_package(VTK CONFIG)
if (NOT VTK_RENDERING_BACKEND)
set(VTK_RENDERING_BACKEND OpenGL)
endif()
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
endif()
set(WikiExamples_TEST_LABELS "foo")
message(STATUS "VTKWikiExamples: VTK VERSION: ${VTK_VERSION}(${VTK_RENDERING_BACKEND})")
set(CMAKE_MODULE_PATH ${WikiExamples_SOURCE_DIR}/CMake ${CMAKE_MODULE_PATH})
option(BUILD_TESTING "Build the testing tree." OFF)
if (BUILD_TESTING)
ENABLE_TESTING()
INCLUDE(CTest)
CONFIGURE_FILE(
${WikiExamples_SOURCE_DIR}/CMake/SampleBuildTest.cmake.in
${WikiExamples_BINARY_DIR}/SampleBuildTest.cmake @ONLY)
message(STATUS "VTKWikiExamples: Tests will be built with label \"WikiExamples\"")
else()
message(STATUS "VTKWikiExamples: Tests will not be built")
endif ()
include(PlatformSpecificChecks)
include(WikiPolicies)
# Set the CMake Policies
WikiPolicies()
#
# Mac specific
IF(APPLE)
SET(EXECUTABLE_FLAG MACOSX_BUNDLE)
ENDIF(APPLE)
#-----------------------------------------------------------------------------
# Output directories.
if(NOT Module_WikiExamples)
IF(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)
SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${WikiExamples_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all libraries.")
ENDIF(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)
IF(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${WikiExamples_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all executables.")
ENDIF(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
MARK_AS_ADVANCED(CMAKE_LIBRARY_OUTPUT_DIRECTORY CMAKE_RUNTIME_OUTPUT_DIRECTORY)
else()
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${VTK_BINARY_DIR}/bin)
endif()
message(STATUS "VTKWikiExamples: Example executables are stored in ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
ADD_SUBDIRECTORY(src/Cxx/Animation)
ADD_SUBDIRECTORY(src/Cxx/CompositeData)
IF(VTK_USE_MYSQL)
ADD_SUBDIRECTORY(src/Cxx/Databases)
ENDIF(VTK_USE_MYSQL)
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(VTK_USE_BOOST)
ENDIF(VTK_USE_INFOVIS)
ADD_SUBDIRECTORY(src/Cxx/ImageData)
ADD_SUBDIRECTORY(src/Cxx/Geovis)
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(VTK_USE_PARALLEL)
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/StructuredGrid)
ADD_SUBDIRECTORY(src/Cxx/Texture)
ADD_SUBDIRECTORY(src/Cxx/Utilities)
ADD_SUBDIRECTORY(src/Cxx/Video)
IF(VTK_USE_VIEWS)
ADD_SUBDIRECTORY(src/Cxx/Views)
ENDIF(VTK_USE_VIEWS)
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)
message(STATUS "VTKWikiExamples: Building Qt examples")
if(${VTK_VERSION} VERSION_GREATER "6" AND VTK_QT_VERSION VERSION_GREATER "4")
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
# We have ui files, this will bring in the macro: qt5_wrap_ui
find_package(Qt5Widgets REQUIRED QUIET)
else()
FIND_PACKAGE(Qt4 REQUIRED)
INCLUDE(${QT_USE_FILE})
endif()
ADD_SUBDIRECTORY(src/Cxx/Qt)
else()
message(STATUS "VTKWikiExamples: Not building Qt examples")
endif()