CMakeLists.txt 2.48 KB
Newer Older
1
2
3
4
cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)
if(POLICY CMP0020)
  cmake_policy(SET CMP0020 NEW)
endif()
5
6
7
if(POLICY CMP0025)
  cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
8
9
10
if(POLICY CMP0053)
  cmake_policy(SET CMP0053 NEW) # CMake 3.1
endif()
11

12
PROJECT(VTKExamples)
Bill Lorensen's avatar
Bill Lorensen committed
13
include_regular_expression("^.*$")
14

Bill Lorensen's avatar
Bill Lorensen committed
15
16
17
18
19
20
if(NOT VTK_BINARY_DIR)
  find_package(VTK REQUIRED)
else()
  set(VTK_DIR ${VTK_BINARY_DIR})
  find_package(VTK REQUIRED)
endif()
21

22
23
if (ANDROID)
  add_subdirectory(Android)
24
25
elseif (APPLE_IOS)
  add_subdirectory(iOS)
Bill Lorensen's avatar
Bill Lorensen committed
26
else()
27
28
29
  if (NOT vtkRenderingCore_LOADED)
    message(STATUS "vtkRenderingCore not found. No examples will be built")
  else()
30
31
32
33
34
35
36
37
38
39
    if (vtkTestingCore_LOADED)
      add_subdirectory(AMR/Cxx)
      add_subdirectory(ImageProcessing/Cxx)
      add_subdirectory(IO/Cxx)
      add_subdirectory(Medical/Cxx)
      add_subdirectory(Modelling/Cxx)
      add_subdirectory(MultiBlock/Cxx)
      add_subdirectory(VisualizationAlgorithms/Cxx)
      add_subdirectory(Widgets/Cxx)
    endif()
40
41
42
43
44
45
46
47
48
49
    add_subdirectory(Annotation/Cxx/LabeledMesh)
    add_subdirectory(DataManipulation/Cxx)
    add_subdirectory(Rendering/Cxx)
    add_subdirectory(Tutorial/Step1/Cxx)
    add_subdirectory(Tutorial/Step2/Cxx)
    add_subdirectory(Tutorial/Step3/Cxx)
    add_subdirectory(Tutorial/Step4/Cxx)
    add_subdirectory(Tutorial/Step5/Cxx)
    add_subdirectory(Tutorial/Step6/Cxx)
    add_subdirectory(VolumeRendering/Cxx)
50

51
    if(VTK_RENDERING_BACKEND STREQUAL "OpenGL" AND vtkTestingCore_LOADED)
52
53
      add_subdirectory(LIC/Cxx)
    endif()
54
55
56
 if(vtkParallelMPI_LOADED AND vtkRenderingParallel_LOADED)
  add_subdirectory(ParallelProcessing/Generic)
 endif()
57
58
59
60
61
62
63
    # This may have been already built as part of the VTK build.
    # If so we cannot create the target "vtkLocalExample" because
    # an imported target of the same name already exists in the
    # VTK build.
    if(NOT vtkLocalExample_LOADED)
      add_subdirectory(Build/vtkLocal)
    endif()
64
    if(TARGET vtkGUISupportQt AND vtkTestingCore_LOADED)
65
66
      add_subdirectory(GUI/Qt)
    endif()
67
  endif()
68

69

70
   add_subdirectory(Build/vtkMy)
71
72

   add_subdirectory(Infovis/Cxx)
Bill Lorensen's avatar
Bill Lorensen committed
73
74
75
76
77
#  add_subdirectory(GUI/Motif)
#
#  IF(VTK_USE_INFOVIS)
#    IF(VTK_USE_CHARTS)
#      add_subdirectory(Charts/Cxx)
78
#    ENDIF()
Bill Lorensen's avatar
Bill Lorensen committed
79
80
#    IF(VTK_USE_N_WAY_ARRAYS)
#      add_subdirectory(Array/Cxx)
81
82
#    ENDIF()
#  ENDIF()
Bill Lorensen's avatar
Bill Lorensen committed
83
84
85
86
87
#   IF(WIN32)
#    add_subdirectory(GUI/Win32/SimpleCxx)
#     IF(VTK_USE_MFC)
#      add_subdirectory(GUI/Win32/SampleMFC)
#      add_subdirectory(GUI/Win32/vtkMFC)
88
89
#    ENDIF()
#  ENDIF()
Bill Lorensen's avatar
Bill Lorensen committed
90
endif()