CMakeLists.txt 2.38 KB
Newer Older
1
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
2

3
PROJECT(VTKExamples)
4
include_regular_expression("^.*$")
5

6 7 8 9 10 11
if(NOT VTK_BINARY_DIR)
  find_package(VTK REQUIRED)
else()
  set(VTK_DIR ${VTK_BINARY_DIR})
  find_package(VTK REQUIRED)
endif()
12

13 14
if (ANDROID)
  add_subdirectory(Android)
15 16
elseif (APPLE_IOS)
  add_subdirectory(iOS)
17
else()
18 19 20
  if (NOT vtkRenderingCore_LOADED)
    message(STATUS "vtkRenderingCore not found. No examples will be built")
  else()
21
    if (vtkTestingCore_LOADED)
22 23 24 25 26 27 28 29 30
      if (NOT VTK_RENDERING_BACKEND STREQUAL "None")
        add_subdirectory(AMR/Cxx)
        add_subdirectory(ImageProcessing/Cxx)
        add_subdirectory(Medical/Cxx)
        add_subdirectory(Modelling/Cxx)
        add_subdirectory(MultiBlock/Cxx)
        add_subdirectory(VisualizationAlgorithms/Cxx)
        add_subdirectory(Widgets/Cxx)
      endif ()
31 32
      add_subdirectory(IO/Cxx)
    endif()
33 34 35 36 37 38 39 40 41 42 43 44 45

    if (NOT VTK_RENDERING_BACKEND STREQUAL "None")
      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)
    endif ()
46

47 48 49 50
    if(vtkParallelMPI_LOADED AND vtkRenderingParallel_LOADED)
      add_subdirectory(ParallelProcessing/Generic)
    endif()

51 52 53 54 55 56 57
    # 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()
58
    if(TARGET vtkGUISupportQt AND vtkTestingCore_LOADED)
59 60
      add_subdirectory(GUI/Qt)
    endif()
61
  endif()
62

63

64
   add_subdirectory(Build/vtkMy)
65

66 67 68
   if (NOT VTK_RENDERING_BACKEND STREQUAL "None")
     add_subdirectory(Infovis/Cxx)
   endif ()
69 70 71 72

   if (vtkChartsCore_LOADED)
    add_subdirectory(Charts/Cxx)
   endif()
73 74 75 76
#
#  IF(VTK_USE_INFOVIS)
#    IF(VTK_USE_N_WAY_ARRAYS)
#      add_subdirectory(Array/Cxx)
77 78
#    ENDIF()
#  ENDIF()
79 80 81 82 83
#   IF(WIN32)
#    add_subdirectory(GUI/Win32/SimpleCxx)
#     IF(VTK_USE_MFC)
#      add_subdirectory(GUI/Win32/SampleMFC)
#      add_subdirectory(GUI/Win32/vtkMFC)
84 85
#    ENDIF()
#  ENDIF()
86
endif()