]> Creatis software - crea.git/blobdiff - cmake/CREAMacro_FindAndUseVTK.cmake
eduardo
[crea.git] / cmake / CREAMacro_FindAndUseVTK.cmake
index 50dfe5b2862aab07e48db23e5f417795f9da19a0..751426ab3211cd7b888a4e99fd078dc9e93d6ae2 100644 (file)
@@ -13,6 +13,18 @@ MACRO(CREA_FIND_AND_USE_VTK)
       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_ )