-
Notifications
You must be signed in to change notification settings - Fork 27
/
CMakeLists.txt
149 lines (137 loc) · 4.79 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
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(Cxx/Animation)
ADD_SUBDIRECTORY(Cxx/CompositeData)
IF(VTK_USE_MYSQL)
ADD_SUBDIRECTORY(Cxx/Databases)
ENDIF(VTK_USE_MYSQL)
ADD_SUBDIRECTORY(Cxx/DataStructures)
if(${VTK_VERSION} VERSION_GREATER "6.10")
ADD_SUBDIRECTORY(Cxx/Developers)
endif()
ADD_SUBDIRECTORY(Cxx/Filtering)
ADD_SUBDIRECTORY(Cxx/GeometricObjects)
IF(VTK_USE_INFOVIS)
IF(VTK_USE_BOOST)
ADD_SUBDIRECTORY(Cxx/Graphs)
ENDIF(VTK_USE_BOOST)
ENDIF(VTK_USE_INFOVIS)
ADD_SUBDIRECTORY(Cxx/ImageData)
ADD_SUBDIRECTORY(Cxx/Geovis)
ADD_SUBDIRECTORY(Cxx/Images)
ADD_SUBDIRECTORY(Cxx/ImplicitFunctions)
ADD_SUBDIRECTORY(Cxx/InfoVis)
ADD_SUBDIRECTORY(Cxx/Interaction)
ADD_SUBDIRECTORY(Cxx/IO)
ADD_SUBDIRECTORY(Cxx/Lighting)
ADD_SUBDIRECTORY(Cxx/Math)
ADD_SUBDIRECTORY(Cxx/Medical)
ADD_SUBDIRECTORY(Cxx/Meshes)
ADD_SUBDIRECTORY(Cxx/Modelling)
IF(VTK_USE_PARALLEL)
ADD_SUBDIRECTORY(Cxx/Parallel)
ENDIF(VTK_USE_PARALLEL)
ADD_SUBDIRECTORY(Cxx/Picking)
ADD_SUBDIRECTORY(Cxx/Plotting)
ADD_SUBDIRECTORY(Cxx/PolyData)
ADD_SUBDIRECTORY(Cxx/Points)
ADD_SUBDIRECTORY(Cxx/RectilinearGrid)
ADD_SUBDIRECTORY(Cxx/Remote)
ADD_SUBDIRECTORY(Cxx/Rendering)
ADD_SUBDIRECTORY(Cxx/RenderMan)
ADD_SUBDIRECTORY(Cxx/SimpleOperations)
ADD_SUBDIRECTORY(Cxx/StructuredGrid)
IF(VTK_USE_TEXT_ANALYSIS)
ADD_SUBDIRECTORY(Cxx/TextAnalysis)
ENDIF(VTK_USE_TEXT_ANALYSIS)
ADD_SUBDIRECTORY(Cxx/Texture)
ADD_SUBDIRECTORY(Cxx/Utilities)
ADD_SUBDIRECTORY(Cxx/Video)
IF(VTK_USE_VIEWS)
ADD_SUBDIRECTORY(Cxx/Views)
ENDIF(VTK_USE_VIEWS)
ADD_SUBDIRECTORY(Cxx/Visualization)
ADD_SUBDIRECTORY(Cxx/VisualizationAlgorithms)
ADD_SUBDIRECTORY(Cxx/VolumeRendering)
ADD_SUBDIRECTORY(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(Cxx/Qt)
else()
message(STATUS "VTKWikiExamples: Not building Qt examples")
endif()
OPTION(RUN_ADMIN_TESTS "Run the admin tests" OFF)
IF( BUILD_TESTING AND RUN_ADMIN_TESTS )
ADD_TEST(CheckPagesForImages ${WikiExamples_SOURCE_DIR}/Admin/CheckPagesForImages)
SET_TESTS_PROPERTIES(CheckPagesForImages PROPERTIES TIMEOUT 2000)
ENDIF()