CMakeLists.txt 1.41 KB
Newer Older
Bill Lorensen's avatar
Bill Lorensen committed
1
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
2 3 4
if(POLICY CMP0025)
  cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
5 6 7
if(POLICY CMP0053)
  cmake_policy(SET CMP0053 NEW) # CMake 3.1
endif()
Bill Lorensen's avatar
Bill Lorensen committed
8

9 10
PROJECT(ImageProcessing)

11
find_package(VTK COMPONENTS
12 13 14 15
  vtkCommonCore
  vtkFiltersCore
  vtkFiltersModeling
  vtkFiltersSources
16 17
  vtkIOImage
  vtkImagingCore
18 19 20
  vtkImagingGeneral
  vtkImagingStatistics
  vtkImagingStencil
21
  vtkInteractionStyle
22
  vtkRendering${VTK_RENDERING_BACKEND}
23 24
  vtkRenderingCore
  vtkTestingCore
25 26
  vtkTestingRendering
)
Bill Lorensen's avatar
Bill Lorensen committed
27
include(${VTK_USE_FILE})
28

Bill Lorensen's avatar
Bill Lorensen committed
29 30
add_executable(ImageSlicing MACOSX_BUNDLE ImageSlicing.cxx)
target_link_libraries(ImageSlicing ${VTK_LIBRARIES})
31

32 33 34 35 36 37
add_executable(ImageBenchmark ImageBenchmark.cxx)
target_link_libraries(ImageBenchmark ${VTK_LIBRARIES})

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

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