CMakeLists.txt 1.55 KB
Newer Older
1 2 3 4 5 6
find_package(VTK REQUIRED)
if(VTK_FOUND)
   include(${VTK_USE_FILE})
else(VTK_FOUND)
   message(FATAL_ERROR "Cannot build without VTK")
endif(VTK_FOUND)
7

8 9
find_package( ITK )
if( ITK_FOUND )
10 11 12 13
  if(${ITK_VERSION_MAJOR} GREATER 3)
    set(ITK_NO_IO_FACTORY_REGISTER_MANAGER 1) # See Libs/ITKFactoryRegistration/CMakeLists.txt
    list(APPEND ITK_LIBRARIES ITKFactoryRegistration)
  endif()
14 15 16 17
  include(${ITK_USE_FILE})
else( ITK_FOUND )
  message( FATAL_ERROR "Cannot build without ITK" )
endif( ITK_FOUND )
18 19


20
############################################################################
21
# The test is a stand-alone executable.  However, the Slicer
22
# launcher is needed to set up shared library paths correctly.
23
############################################################################
24

25 26 27
set(VTKITKTESTVECTORREADER_SOURCE VTKITKVectorReader.cxx)
add_executable(VTKITKVectorReader ${VTKITKTESTVECTORREADER_SOURCE})
target_link_libraries(VTKITKVectorReader
28
  vtkITK)
29 30
add_test(
  NAME VTKITKVectorReader
31
  COMMAND ${Slicer_LAUNCH_COMMAND} $<TARGET_FILE:VTKITKVectorReader>
32
    ${MRML_TEST_DATA_DIR}/fixed.nrrd
33
  )
34

35 36 37
set(VTKITKBSPLINETRANSFORM_SOURCE VTKITKBSplineTransform.cxx)
add_executable(VTKITKBSplineTransform ${VTKITKBSPLINETRANSFORM_SOURCE})
target_link_libraries(VTKITKBSplineTransform
38
  vtkITK)
39
add_test(
40
  NAME VTKITKBSplineTransform
41
  COMMAND ${Slicer_LAUNCH_COMMAND} $<TARGET_FILE:VTKITKBSplineTransform> VTKITKBSplineTransform
42
  )
43 44 45

slicer_add_python_unittest(SCRIPT vtkITKArchetypeDiffusionTensorReaderFile.py)
slicer_add_python_unittest(SCRIPT vtkITKArchetypeScalarReaderFile.py)