CMake: Improve Linux GTK2 build
Use version comparison instead of normal comparison for libnotify. Fix warning if mismatched if statement in FindGNOMEVFS2. Check for GREATER_EQUAL GTK versions, same as configure does. Don't check for GTK 1 or define __WXGTK127__. CMake does not support GTK1 and it should not be defined when GTK 2/3/4 is used.
This commit is contained in:
parent
5ebcfd7681
commit
34afcb57a8
@ -510,7 +510,7 @@ if(wxUSE_GUI)
|
||||
if(NOT LIBNOTIFY_FOUND)
|
||||
message(WARNING "Libnotify not found, it won't be used for notifications")
|
||||
wx_option_force_value(wxUSE_LIBNOTIFY OFF)
|
||||
elseif((LIBNOTIFY_VERSION GREATER 0.7) OR (LIBNOTIFY_VERSION EQUAL 0.7))
|
||||
elseif(LIBNOTIFY_VERSION VERSION_GREATER_EQUAL 0.7)
|
||||
set(wxUSE_LIBNOTIFY_0_7 ON)
|
||||
endif()
|
||||
else()
|
||||
|
@ -78,7 +78,7 @@ else (GNOMEVFS2_LIBRARIES AND GNOMEVFS2_INCLUDE_DIRS)
|
||||
message(STATUS "Found GnomeVFS2: ${GNOMEVFS2_LIBRARIES}")
|
||||
endif (NOT GNOMEVFS2_FIND_QUIETLY)
|
||||
else (GNOMEVFS2_FOUND)
|
||||
if (GnomeVFS2_FIND_REQUIRED)
|
||||
if (GNOMEVFS2_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could not find GnomeVFS2")
|
||||
endif (GNOMEVFS2_FIND_REQUIRED)
|
||||
endif (GNOMEVFS2_FOUND)
|
||||
|
@ -57,8 +57,8 @@ endif()
|
||||
|
||||
if(WXGTK)
|
||||
# Add GTK version definitions
|
||||
foreach(gtk_version 1.2.7 2.0 2.10 2.18 2.20 3.0 3.90.0)
|
||||
if(wxTOOLKIT_VERSION VERSION_GREATER gtk_version)
|
||||
foreach(gtk_version 2.0 2.10 2.18 2.20 3.0 3.90.0)
|
||||
if(wxTOOLKIT_VERSION VERSION_GREATER_EQUAL gtk_version)
|
||||
if(gtk_version EQUAL 3.90.0)
|
||||
set(__WXGTK4__ ON)
|
||||
elseif(gtk_version EQUAL 3.0)
|
||||
|
Loading…
Reference in New Issue
Block a user