From cdab97614883dd77ee02b3dd4e26a5be97e1568e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 31 Aug 2023 16:01:21 +0200 Subject: [PATCH] Build fixes for wxUSE_WEBVIEW_CHROMIUM && !wxUSE_WEBVIEW_WEBKIT Fix wxGTK build when CEF backend is available but WebKit(2) one is not. --- include/wx/chkconf.h | 3 ++- include/wx/gtk/webviewhistoryitem_webkit.h | 4 ++-- src/common/webview.cpp | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/wx/chkconf.h b/include/wx/chkconf.h index 969d9ab547..8fde4b0aa0 100644 --- a/include/wx/chkconf.h +++ b/include/wx/chkconf.h @@ -2280,7 +2280,8 @@ #endif /* wxUSE_TREELISTCTRL */ #if wxUSE_WEBVIEW && !(wxUSE_WEBVIEW_WEBKIT || wxUSE_WEBVIEW_WEBKIT2 || \ - wxUSE_WEBVIEW_IE || wxUSE_WEBVIEW_EDGE) + wxUSE_WEBVIEW_IE || wxUSE_WEBVIEW_EDGE || \ + wxUSE_WEBVIEW_CHROMIUM) # ifdef wxABORT_ON_CONFIG_ERROR # error "wxUSE_WEBVIEW requires at least one backend" # else diff --git a/include/wx/gtk/webviewhistoryitem_webkit.h b/include/wx/gtk/webviewhistoryitem_webkit.h index 3137b3ae83..08a0628adc 100644 --- a/include/wx/gtk/webviewhistoryitem_webkit.h +++ b/include/wx/gtk/webviewhistoryitem_webkit.h @@ -11,7 +11,7 @@ #include "wx/setup.h" -#if wxUSE_WEBVIEW && (wxUSE_WEBVIEW_WEBKIT || wxUSE_WEBVIEW_WEBKIT2) && defined(__WXGTK__) +#if wxUSE_WEBVIEW && defined(__WXGTK__) class WXDLLIMPEXP_WEBVIEW wxWebViewHistoryItem { @@ -28,6 +28,6 @@ private: void* m_histItem; }; -#endif // wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT && defined(__WXGTK__) +#endif // wxUSE_WEBVIEW && defined(__WXGTK__) #endif // _WX_GTK_WEBVIEWHISTORYITEM_H_ diff --git a/src/common/webview.cpp b/src/common/webview.cpp index 33fb2b8de0..99a880ed66 100644 --- a/src/common/webview.cpp +++ b/src/common/webview.cpp @@ -521,7 +521,7 @@ void wxWebView::InitFactoryMap() (new wxWebViewFactoryEdge)); #endif -#else +#elif wxUSE_WEBVIEW_WEBKIT || wxUSE_WEBVIEW_WEBKIT2 if(m_factoryMap.find(wxWebViewBackendWebKit) == m_factoryMap.end()) RegisterFactory(wxWebViewBackendWebKit, wxSharedPtr (new wxWebViewFactoryWebKit));