diff --git a/build/cmake/init.cmake b/build/cmake/init.cmake index 494a5938cc..bb6602c295 100644 --- a/build/cmake/init.cmake +++ b/build/cmake/init.cmake @@ -486,16 +486,18 @@ if(wxUSE_GUI) message(WARNING "webkit or chromium not found or enabled, wxWebview won't be available") wx_option_force_value(wxUSE_WEBVIEW OFF) endif() - elseif(WXMSW) - if(NOT wxUSE_WEBVIEW_IE AND NOT wxUSE_WEBVIEW_EDGE AND NOT wxUSE_WEBVIEW_CHROMIUM) - message(WARNING "WebviewIE and WebviewEdge and WebviewChromium not found or enabled, wxWebview won't be available") - wx_option_force_value(wxUSE_WEBVIEW OFF) - endif() elseif(APPLE) if(NOT wxUSE_WEBVIEW_WEBKIT AND NOT wxUSE_WEBVIEW_CHROMIUM) message(WARNING "webkit and chromium not found or enabled, wxWebview won't be available") wx_option_force_value(wxUSE_WEBVIEW OFF) endif() + else() + set(wxUSE_WEBVIEW_WEBKIT OFF) + endif() + + if(WXMSW AND NOT wxUSE_WEBVIEW_IE AND NOT wxUSE_WEBVIEW_EDGE AND NOT wxUSE_WEBVIEW_CHROMIUM) + message(WARNING "WebviewIE and WebviewEdge and WebviewChromium not found or enabled, wxWebview won't be available") + wx_option_force_value(wxUSE_WEBVIEW OFF) endif() if(wxUSE_WEBVIEW_CHROMIUM AND WIN32 AND NOT MSVC) @@ -545,6 +547,32 @@ if(wxUSE_GUI) endif() endif() + set(wxWebviewInfo "enable wxWebview") + if(wxUSE_WEBVIEW) + if(wxUSE_WEBVIEW_WEBKIT) + list(APPEND webviewBackends "WebKit") + endif() + if(wxUSE_WEBVIEW_WEBKIT2) + list(APPEND webviewBackends "WebKit2") + endif() + if(wxUSE_WEBVIEW_EDGE) + if(wxUSE_WEBVIEW_EDGE_STATIC) + list(APPEND webviewBackends "Edge (static)") + else() + list(APPEND webviewBackends "Edge") + endif() + endif() + if(wxUSE_WEBVIEW_IE) + list(APPEND webviewBackends "IE") + endif() + if(wxUSE_WEBVIEW_CHROMIUM) + list(APPEND webviewBackends "Chromium") + endif() + string(REPLACE ";" ", " webviewBackends "${webviewBackends}") + set(wxWebviewInfo "${wxWebviewInfo} with ${webviewBackends}") + endif() + set(wxTHIRD_PARTY_LIBRARIES ${wxTHIRD_PARTY_LIBRARIES} wxUSE_WEBVIEW ${wxWebviewInfo}) + if(wxUSE_PRIVATE_FONTS AND WXGTK) find_package(FONTCONFIG) find_package(PANGOFT2)