X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=cmake%2FCREAMacro_FindAndUseVTK.cmake;h=751426ab3211cd7b888a4e99fd078dc9e93d6ae2;hb=67cfeeb9d43ac96601468142be67dd54c4f52031;hp=72871e095e489f43d4044c25f37ed41076caceb3;hpb=a40f7ea52f4645e5f9de29de3f5314eb62e4fb7b;p=crea.git diff --git a/cmake/CREAMacro_FindAndUseVTK.cmake b/cmake/CREAMacro_FindAndUseVTK.cmake index 72871e0..751426a 100644 --- a/cmake/CREAMacro_FindAndUseVTK.cmake +++ b/cmake/CREAMacro_FindAndUseVTK.cmake @@ -5,11 +5,27 @@ MACRO(CREA_FIND_AND_USE_VTK) FIND_PACKAGE(VTK) # If vtk found IF(VTK_FOUND) + MESSAGE ( STATUS "=======================================") MESSAGE ( STATUS "Looking for VTK... found") MESSAGE ( STATUS "* Dir = ${VTK_DIR}") MESSAGE ( STATUS "* Version = ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION}") - INCLUDE(${VTK_USE_FILE}) + SET(VTK_BUILD_SETTINGS_FILE OFF) + INCLUDE(${VTK_USE_FILE}) + + IF(VTK_USE_GL2PS) + add_definitions(-DUSE_WXGLCANVAS) + # CMake 2.6: + # technically those packages are not required since one can still use the Motif/X11 version and not the gtk one: + FIND_PACKAGE(PkgConfig) + pkg_check_modules (GTK2 gtk+-2.0) + #MESSAGE("${GTK2_INCLUDE_DIRS}") + INCLUDE_DIRECTORIES(${GTK2_INCLUDE_DIRS}) + LINK_LIBRARIES(${GTK2_LIBRARIES}) + # Can I require all my user to have the gl lib on linux, even if they do not really need it... + SET(WXGLCANVASLIBS "gl") + ENDIF(VTK_USE_GL2PS) + CREA_DEFINE( USE_VTK ) CREA_DEFINE( _USE_VTK_ ) SET(VTK_LIBRARIES @@ -21,9 +37,11 @@ MACRO(CREA_FIND_AND_USE_VTK) vtkImaging # filters such as vtkImageAnisotropicDiffusion3D vtkGraphics # vtkContourFilter, sources vtkVolumeRendering # Mappers - # vtkGenericFiltering - # LG : removed vtkIO because conflict with itktiff lib in ITKIO ?? - ) + vtkGenericFiltering + vtkHybrid +# vtkInfovis +# vtkViews + ) IF(NOT USE_ITK) SET(VTK_LIBRARIES ${VTK_LIBRARIES} vtkIO) ENDIF(NOT USE_ITK)