Add support for building WebView with libwebkit2gtk-4.1
libwebkit2gtk-4.1 has the same API as libwebkit2gtk-4.0, except that the former links with libsoup-3.0 and the latter links with libsoup-2.4. Fixes #23630.
This commit is contained in:
parent
5f5e5c27dd
commit
1b86644266
6 changed files with 7880 additions and 6415 deletions
|
|
@ -444,15 +444,21 @@ if(wxUSE_GUI)
|
|||
if(wxUSE_WEBVIEW)
|
||||
if(WXGTK)
|
||||
if(wxUSE_WEBVIEW_WEBKIT)
|
||||
find_package(LIBSOUP)
|
||||
set(WEBKIT_LIBSOUP_VERSION 2.4)
|
||||
if(WXGTK2)
|
||||
find_package(WEBKIT 1.0)
|
||||
elseif(WXGTK3)
|
||||
find_package(WEBKIT2)
|
||||
find_package(WEBKIT2 4.1)
|
||||
if(WEBKIT2_FOUND)
|
||||
set(WEBKIT_LIBSOUP_VERSION 3.0)
|
||||
else()
|
||||
find_package(WEBKIT2 4.0)
|
||||
endif()
|
||||
if(NOT WEBKIT2_FOUND)
|
||||
find_package(WEBKIT 3.0)
|
||||
endif()
|
||||
endif()
|
||||
find_package(LIBSOUP ${WEBKIT_LIBSOUP_VERSION})
|
||||
endif()
|
||||
set(wxUSE_WEBVIEW_WEBKIT OFF)
|
||||
set(wxUSE_WEBVIEW_WEBKIT2 OFF)
|
||||
|
|
|
|||
|
|
@ -31,19 +31,27 @@
|
|||
# LibSoup does not provide an easy way to retrieve its version other than its
|
||||
# .pc file, so we need to rely on PC_LIBSOUP_VERSION and REQUIRE the .pc file
|
||||
# to be found.
|
||||
SET(LIBSOUP_VERSION 2.4)
|
||||
if(DEFINED LIBSOUP_FIND_VERSION)
|
||||
SET(LIBSOUP_VERSION ${LIBSOUP_FIND_VERSION})
|
||||
endif()
|
||||
|
||||
set(LIBSOUP_INCLUDE_DIRS LIBSOUP_INCLUDE_DIRS-NOTFOUND)
|
||||
set(LIBSOUP_LIBRARIES LIBSOUP_LIBRARIES-NOTFOUND)
|
||||
|
||||
FIND_PACKAGE(PkgConfig)
|
||||
PKG_CHECK_MODULES(PC_LIBSOUP QUIET libsoup-2.4)
|
||||
PKG_CHECK_MODULES(PC_LIBSOUP QUIET libsoup-${LIBSOUP_VERSION})
|
||||
|
||||
if(PC_LIBSOUP_FOUND)
|
||||
FIND_PATH(LIBSOUP_INCLUDE_DIRS
|
||||
NAMES libsoup/soup.h
|
||||
HINTS ${PC_LIBSOUP_INCLUDEDIR}
|
||||
${PC_LIBSOUP_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES libsoup-2.4
|
||||
PATH_SUFFIXES libsoup-${LIBSOUP_VERSION}
|
||||
)
|
||||
|
||||
FIND_LIBRARY(LIBSOUP_LIBRARIES
|
||||
NAMES soup-2.4
|
||||
NAMES soup-${LIBSOUP_VERSION}
|
||||
HINTS ${PC_LIBSOUP_LIBDIR}
|
||||
${PC_LIBSOUP_LIBRARY_DIRS}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,10 @@
|
|||
# WEBKIT2_LIBRARIES - List of libraries when using Webkit2.
|
||||
# WEBKIT2_FOUND - True if Webkit2 found.
|
||||
|
||||
SET( WEBKIT2_VERSION 4.0)
|
||||
SET(WEBKIT2_VERSION 4.0)
|
||||
if(DEFINED WEBKIT2_FIND_VERSION)
|
||||
SET(WEBKIT2_VERSION ${WEBKIT2_FIND_VERSION})
|
||||
endif()
|
||||
|
||||
set(WEBKIT2_INCLUDE_DIR WEBKIT2_INCLUDE_DIR-NOTFOUND)
|
||||
set(WEBKIT2_LIBRARY WEBKIT2_LIBRARY-NOTFOUND)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue