Add support for GTK4 to CMake build too

Closes https://github.com/wxWidgets/wxWidgets/pull/1643
This commit is contained in:
wangqr
2019-11-08 14:12:26 +08:00
committed by Vadim Zeitlin
parent c433d3d0fd
commit 46a94c2b48
3 changed files with 60 additions and 6 deletions

View File

@@ -65,10 +65,16 @@ endif()
if(WXGTK)
# Add GTK version definitions
foreach(gtk_version 1.2.7 2.0 2.10 2.18 2.20 3.0)
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)
string(REPLACE . "" gtk_version_dotless ${gtk_version})
set(__WXGTK${gtk_version_dotless}__ ON)
if(gtk_version EQUAL 3.90.0)
set(__WXGTK4__ ON)
elseif(gtk_version EQUAL 3.0)
set(__WXGTK3__ ON)
else()
string(REPLACE . "" gtk_version_dotless ${gtk_version})
set(__WXGTK${gtk_version_dotless}__ ON)
endif()
endif()
endforeach()
endif()