1 MACRO(CREA_FIND_AND_USE_VTK)
2 #---------------------------------------------------------------------------
5 message("DFCH--VTK: CREAMacro_FindAndUseVTK.cmake: "${CMAKE_CURRENT_LIST_FILE})
6 message("DFCH--VTK: CREAMacro_FindAndUseVTK.cmake: "${_IMPORT_PREFIX})
11 MESSAGE ( STATUS "=======================================")
12 MESSAGE ( STATUS "Looking for VTK... found")
13 MESSAGE ( STATUS "* Dir = ${VTK_DIR}")
14 MESSAGE ( STATUS "* Version = ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION}")
15 SET(VTK_BUILD_SETTINGS_FILE OFF)
16 INCLUDE(${VTK_USE_FILE})
17 LINK_DIRECTORIES(${VTK_DIR}) #DFCH -- 16/7/2012
20 add_definitions(-DUSE_WXGLCANVAS)
22 # technically those packages are not required since one can still use the Motif/X11 version and not the gtk one:
23 FIND_PACKAGE(PkgConfig)
24 pkg_check_modules (GTK2 gtk+-2.0)
25 #MESSAGE("${GTK2_INCLUDE_DIRS}")
26 INCLUDE_DIRECTORIES(${GTK2_INCLUDE_DIRS})
27 LINK_LIBRARIES(${GTK2_LIBRARIES})
28 # Can I require all my user to have the gl lib on linux, even if they do not really need it...
29 SET(WXGLCANVASLIBS "gl")
32 CREA_DEFINE( USE_VTK )
33 CREA_DEFINE( _USE_VTK_ )
36 vtkFiltering # vtkImageData
37 vtkRendering # vtkProp3D
38 vtkWidgets # vtkImagePlaneWidget
39 vtkIO # vtkMetaImageReader/Writer
40 vtkImaging # filters such as vtkImageAnisotropicDiffusion3D
41 vtkGraphics # vtkContourFilter, sources
42 vtkVolumeRendering # Mappers
49 SET(VTK_LIBRARIES ${VTK_LIBRARIES} vtkIO)
51 MARK_AS_ADVANCED(VTK_DIR)
53 message(FATAL_ERROR "VTK_DIR not found")
56 #---------------------------------------------------------------------------
57 ENDMACRO(CREA_FIND_AND_USE_VTK)