X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=cmake%2FCREAMacro_wxWidgets.cmake;h=765ddf8614eee206bd9323c89336ae9a67d93b79;hb=3515b7a46a340e2e6bd54c637ef5236426403e6b;hp=6e5dd19d3a70cc2959750fab2735b6ccabd05ead;hpb=8420c208c3966b1c272a54e16951bcb419429f41;p=crea.git diff --git a/cmake/CREAMacro_wxWidgets.cmake b/cmake/CREAMacro_wxWidgets.cmake index 6e5dd19..765ddf8 100644 --- a/cmake/CREAMacro_wxWidgets.cmake +++ b/cmake/CREAMacro_wxWidgets.cmake @@ -27,12 +27,22 @@ MACRO(CREA_FIND_WXWIDGETS) # ELSE(WIN32) + # 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}") + # Can I require all my user to have the gl lib on linux, even if they do not really need it... + SET(WXGLCANVASLIBS "gl") # GTK2 - INCLUDE(${CREA_CMAKE_DIR}/FindGTK2.cmake) + # INCLUDE(${CREA_CMAKE_DIR}/FindGTK2_new.cmake) # WX # LG : Do not force but use what is installed ! # SET(wxWidgets_USE_LIBS base core gl) - FIND_PACKAGE( wxWidgets REQUIRED) + #FIND_PACKAGE( GTK REQUIRED) +# FIND_PACKAGE( wxWidgets REQUIRED) + FIND_PACKAGE(wxWidgets COMPONENTS base core adv ${WXGLCANVASLIBS}) # IF(wxWidgets_FOUND) MESSAGE(STATUS "Looking for wxWidgets... found ${wxWidgets_CONFIG_EXECUTABLE}") @@ -72,10 +82,14 @@ MACRO(CREA_USE_WXWIDGETS) LINK_DIRECTORIES(${GTK2_LIBRARY_DIRS}) LINK_LIBRARIES(${GTK2_LIBRARIES}) # WX + + +# INCLUDE( ${GTK_USE_FILE} ) INCLUDE( ${wxWidgets_USE_FILE} ) MARK_AS_ADVANCED(wxWidgets_CONFIG_EXECUTABLE) SET(WXWIDGETS_LIBRARIES ${GTK2_LIBRARIES} + #${GTK_LIBRARIES} ${wxWidgets_LIBRARIES} ) ENDIF(WIN32)