CMakeLists.txt 914 Bytes
Newer Older
Bill Lorensen's avatar
Bill Lorensen committed
1 2
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)

3 4 5 6
if(POLICY CMP0020)
  cmake_policy(SET CMP0020 NEW) # remove if CMake >= 2.8.11 required
endif()

7 8
PROJECT(ImageProcessing)

Bill Lorensen's avatar
Bill Lorensen committed
9 10 11 12 13 14 15 16 17 18 19 20 21 22
if(NOT VTK_BINARY_DIR)
  find_package(VTK COMPONENTS
    vtkCommonCore
    vtkCommonDataModel
    vtkCommonExecutionModel
    vtkCommonMath
    vtkIOImage
    vtkImagingCore
    vtkInteractionStyle
    vtkRenderingCore
    vtkRenderingOpenGL
  )
include(${VTK_USE_FILE})
endif()
23

Bill Lorensen's avatar
Bill Lorensen committed
24 25
add_executable(ImageSlicing MACOSX_BUNDLE ImageSlicing.cxx)
target_link_libraries(ImageSlicing ${VTK_LIBRARIES})
26

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