CMake: Download SDK when wxUSE_WEBVIEW_EDGE=ON

Automatically download the WebView2 SDK from nuget (official repo for the SDK)
when enabling wxUSE_WEBVIEW_EDGE to simplify usage.
Copying to 3rdparty/webview2 is still supported optionally.
This commit is contained in:
Tobias Taschner
2021-02-08 21:29:08 +01:00
parent d4e5adf5d6
commit 1ee05c54ed
4 changed files with 41 additions and 13 deletions

View File

@@ -453,10 +453,6 @@ 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)