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}")
- SET(VTK_BUILD_SETTINGS_FILE OFF)
- 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