diff --git a/build/cmake/init.cmake b/build/cmake/init.cmake index 6dca1cc869..a125c10979 100644 --- a/build/cmake/init.cmake +++ b/build/cmake/init.cmake @@ -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) diff --git a/build/cmake/options.cmake b/build/cmake/options.cmake index e8b035ad7f..2a88f8c24e 100644 --- a/build/cmake/options.cmake +++ b/build/cmake/options.cmake @@ -435,6 +435,18 @@ wx_option(wxUSE_ICO_CUR "use Windows ICO and CUR formats") # --------------------------------------------------------------------------- if(WIN32) + if(MSVC_VERSION GREATER 1600 AND NOT CMAKE_VS_PLATFORM_TOOLSET MATCHES "_xp$") + set(wxUSE_WINRT_DEFAULT ON) + else() + set(wxUSE_WINRT_DEFAULT OFF) + endif() + if(MSVC_VERSION GREATER 1800 AND NOT CMAKE_VS_PLATFORM_TOOLSET MATCHES "_xp$") + set(wxUSE_WEBVIEW_EDGE_DEFAULT ON) + else() + set(wxUSE_WEBVIEW_EDGE_DEFAULT OFF) + endif() + + wx_option(wxUSE_ACCESSIBILITY "enable accessibility support") wx_option(wxUSE_ACTIVEX " enable wxActiveXContainer class (Win32 only)") wx_option(wxUSE_CRASHREPORT "enable wxCrashReport::Generate() to create mini dumps (Win32 only)") wx_option(wxUSE_DC_CACHEING "cache temporary wxDC objects (Win32 only)") @@ -444,16 +456,10 @@ if(WIN32) wx_option(wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW "use PS printing in wxMSW (Win32 only)") wx_option(wxUSE_TASKBARICON_BALLOONS "enable wxTaskBarIcon::ShowBalloon() method (Win32 only)") wx_option(wxUSE_UXTHEME "enable support for Windows XP themed look (Win32 only)") + wx_option(wxUSE_WEBVIEW_EDGE "use wxWebView Edge (Chromium) backend (Windows 7+ only)" ${wxUSE_WEBVIEW_EDGE_DEFAULT}) wx_option(wxUSE_WEBVIEW_IE "use wxWebView IE backend (Win32 only)") - wx_option(wxUSE_WEBVIEW_EDGE "use wxWebView Edge (Chromium) backend (Windows 7+ only)" OFF) - wx_option(wxUSE_WXDIB "use wxDIB class (Win32 only)") - if(MSVC_VERSION GREATER 1600 AND NOT CMAKE_VS_PLATFORM_TOOLSET MATCHES "_xp$") - set(wxUSE_WINRT_DEFAULT ON) - else() - set(wxUSE_WINRT_DEFAULT OFF) - endif() wx_option(wxUSE_WINRT "enable WinRT support" ${wxUSE_WINRT_DEFAULT}) - wx_option(wxUSE_ACCESSIBILITY "enable accessibility support") + wx_option(wxUSE_WXDIB "use wxDIB class (Win32 only)") endif() # this one is not really MSW-specific but it exists mainly to be turned off