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

3

4
PROJECT(ImageProcessing)
5 6
find_package(VTK REQUIRED)
vtk_module_config(VTK
7 8 9 10
  vtkCommonCore
  vtkFiltersCore
  vtkFiltersModeling
  vtkFiltersSources
11 12
  vtkIOImage
  vtkImagingCore
13 14 15
  vtkImagingGeneral
  vtkImagingStatistics
  vtkImagingStencil
16
  vtkInteractionStyle
17
  vtkRenderingOpenGL2
18 19
  vtkRenderingCore
  vtkTestingCore
20 21
  vtkTestingRendering
)
22
include(${VTK_USE_FILE})
23

24 25
add_executable(ImageSlicing MACOSX_BUNDLE ImageSlicing.cxx)
target_link_libraries(ImageSlicing ${VTK_LIBRARIES})
26

27 28 29 30 31 32
add_executable(ImageBenchmark ImageBenchmark.cxx)
target_link_libraries(ImageBenchmark ${VTK_LIBRARIES})

add_executable(ImageBenchmarkDriver ImageBenchmarkDriver.cxx)
target_link_libraries(ImageBenchmarkDriver ${VTK_LIBRARIES})

33 34 35 36
if(BUILD_TESTING)
  if(vtkTestingRendering_LOADED)
   ######## Regression Testing ########
   set(vtk-example ImageProcessingExamples)
37
   set(TestImageSlicing_ARGS ${VTK_TEST_DATA_DIR}/Data/headsq/quarter)
38 39
   set(TestImageBenchmark_ARGS
       "--threads" "2" "--filter" "resize:kernelsize=4")
Ben Boeckel's avatar
Ben Boeckel committed
40
   vtk_add_test_cxx(${vtk-example}CxxTests tests
41
     TestImageBenchmark.cxx,NO_VALID,NO_DATA,NO_OUTPUT
42 43
     TestImageSlicing.cxx
     )
Ben Boeckel's avatar
Ben Boeckel committed
44 45 46
   vtk_test_cxx_executable(${vtk-example}CxxTests tests
     RENDERING_FACTORY
     )
47
  endif()
48
endif()