From: guigues Date: Thu, 20 Nov 2008 12:55:23 +0000 (+0000) Subject: Modified GTK2 find mecanism for cmake > 2.4 X-Git-Tag: v0.9.1~89 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=321882d3b5f4525bd7177cbe0168d8fb95fa4fc0;p=bbtk.git Modified GTK2 find mecanism for cmake > 2.4 --- diff --git a/kernel/cmake/BBTKFindGTK2.cmake b/kernel/cmake/BBTKFindGTK2.cmake index dcd23fe..190a976 100644 --- a/kernel/cmake/BBTKFindGTK2.cmake +++ b/kernel/cmake/BBTKFindGTK2.cmake @@ -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) diff --git a/kernel/cmake/BBTKWxWidgets.cmake b/kernel/cmake/BBTKWxWidgets.cmake index 84aeea8..e104590 100644 --- a/kernel/cmake/BBTKWxWidgets.cmake +++ b/kernel/cmake/BBTKWxWidgets.cmake @@ -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)