Updates will be applied today, at 5:15 pm EDT (UTC-0500). This should not cause an interruption.

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

3

Bill Lorensen's avatar
Bill Lorensen committed
4
PROJECT (IO)
5

6 7 8
find_package(VTK REQUIRED)
if (vtkIOExport_LOADED AND vtkIOImport_LOADED)
vtk_module_config(VTK
9 10 11
  vtkCommonCore
  vtkIOLegacy
  vtkIOXML
12
  vtkIOGeometry
13
  vtkTestingRendering
14 15 16
  vtkInteractionStyle
  vtkIOImport
  vtkIOExport
17 18
  vtksys
)
19 20 21 22 23 24 25 26 27 28 29 30
else()
vtk_module_config(VTK
  vtkCommonCore
  vtkIOLegacy
  vtkIOXML
  vtkIOGeometry
  vtkTestingRendering
  vtkInteractionStyle
  vtkIOImport
  vtksys
)
endif()
31
include(${VTK_USE_FILE})
32

33 34
add_executable(DumpXMLFile MACOSX_BUNDLE DumpXMLFile.cxx)
target_link_libraries(DumpXMLFile ${VTK_LIBRARIES})
35

36 37
add_executable(ParticleReader MACOSX_BUNDLE ParticleReader.cxx)
target_link_libraries(ParticleReader ${VTK_LIBRARIES})
Bill Lorensen's avatar
Bill Lorensen committed
38

39 40 41 42 43
if (vtkIOExport_LOADED AND vtkIOImport_LOADED)
  add_executable(objtovtp objtovtp.cxx)
  target_link_libraries(objtovtp ${VTK_LIBRARIES})
endif()

44 45 46 47
if(BUILD_TESTING)
  if(vtkTestingRendering_LOADED)
    ######## Regression Testing ########
    set(vtk-example IOExamples)
48 49 50 51
    set(TestDumpXMLFile_ARGS "DATA{${VTK_TEST_INPUT_DIR}/cow.vtp}")
    set(TestParticleReader_ARGS
      "${VTK_TEST_DATA_DIR}/Data/golf.csv"
      ${VTK_TEST_OUTPUT_DIR}/TestParticleReader.vtp)
Ben Boeckel's avatar
Ben Boeckel committed
52 53
    vtk_add_test_cxx(${vtk-example}CxxTests tests
      NO_DATA NO_VALID NO_OUTPUT
54 55 56
      TestParticleReader.cxx
      TestDumpXMLFile.cxx
      )
Ben Boeckel's avatar
Ben Boeckel committed
57 58 59
    vtk_test_cxx_executable(${vtk-example}CxxTests tests
      RENDERING_FACTORY
      )
60 61
  endif()
endif()