CMake: Enable wxUSE_WEBVIEW_EDGE when WebView2 SDK is detected

Only for MSVC >1800 (Visual Studio 2017, vc140) and later.
This commit is contained in:
Maarten Bent
2021-01-19 22:42:42 +01:00
parent 71c4653b94
commit c8a71bc631
2 changed files with 18 additions and 8 deletions

View File

@@ -453,6 +453,10 @@ if(wxUSE_GUI)
wx_option_force_value(wxUSE_WEBVIEW OFF)
endif()
elseif(WXMSW)
if(wxUSE_WEBVIEW_EDGE AND NOT EXISTS "${wxSOURCE_DIR}/3rdparty/webview2")
message("WebView2 SDK not found, WebviewEdge won't be available")
wx_option_force_value(wxUSE_WEBVIEW_EDGE OFF)
endif()
if(NOT wxUSE_WEBVIEW_IE AND NOT wxUSE_WEBVIEW_EDGE)
message(WARNING "WebviewIE and WebviewEdge not found or enabled, wxWebview won't be available")
wx_option_force_value(wxUSE_WEBVIEW OFF)