CMakeLists.txt 893 Bytes
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 12 13 14
find_package(VTK COMPONENTS
  vtkIOImage
  vtkImagingCore
  vtkInteractionStyle
15
  vtkRendering${VTK_RENDERING_BACKEND}
16 17
  vtkTestingRendering
)
Bill Lorensen's avatar
Bill Lorensen committed
18
include(${VTK_USE_FILE})
19

Bill Lorensen's avatar
Bill Lorensen committed
20 21
add_executable(ImageSlicing MACOSX_BUNDLE ImageSlicing.cxx)
target_link_libraries(ImageSlicing ${VTK_LIBRARIES})
22

23 24 25 26
if(BUILD_TESTING)
  if(vtkTestingRendering_LOADED)
   ######## Regression Testing ########
   set(vtk-example ImageProcessingExamples)
27
   set(TestImageSlicing_ARGS ${VTK_TEST_DATA_DIR}/Data/headsq/quarter)
Ben Boeckel's avatar
Ben Boeckel committed
28
   vtk_add_test_cxx(${vtk-example}CxxTests tests
29 30
     TestImageSlicing.cxx
     )
Ben Boeckel's avatar
Ben Boeckel committed
31 32 33
   vtk_test_cxx_executable(${vtk-example}CxxTests tests
     RENDERING_FACTORY
     )
34
 endif()
Bill Lorensen's avatar
Bill Lorensen committed
35
endif()