]> Creatis software - bbtk.git/commitdiff
Modified GTK2 find mecanism for cmake > 2.4
authorguigues <guigues>
Thu, 20 Nov 2008 12:55:23 +0000 (12:55 +0000)
committerguigues <guigues>
Thu, 20 Nov 2008 12:55:23 +0000 (12:55 +0000)
kernel/cmake/BBTKFindGTK2.cmake
kernel/cmake/BBTKWxWidgets.cmake

index dcd23fe2b920358c32181a08f01a9961eb372db9..190a9764bf3388b34927d8cce13d207693a099ad 100644 (file)
@@ -1,4 +1,15 @@
 
+# for CMake 2.6 
+IF(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4)
+  # 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}")
+
+# older CMake 
+ELSE(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4)
+
 IF (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
   # in cache already
   SET(GTK2_FOUND TRUE)
@@ -329,3 +340,4 @@ ELSE (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
   ENDIF(UNIX)
 ENDIF (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
 
+ENDIF(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4)
index 84aeea8f4fe2a695b6d2738170321678f328ff4a..e1045903df49263053e6bb911d90eea149989e1d 100644 (file)
@@ -33,6 +33,9 @@ MACRO(BBTK_FIND_WXWIDGETS)
     # WX
     # LG : Do not force but use what is installed !
     # SET(wxWidgets_USE_LIBS base core gl)
+    # Can I require all my user to have the gl lib on linux, even if they do not really need it...
+    SET(WXGLCANVASLIBS "gl")
+
     FIND_PACKAGE( wxWidgets REQUIRED) 
     #
     IF(wxWidgets_FOUND)