Add wxWebView Edge (Chromium) implementation

This backend requires WebView2 SDK and enables usage of Edge (Chromium)
on Windows 7 and newer
This commit is contained in:
Markus Pingel
2020-01-09 13:54:42 +01:00
committed by Tobias Taschner
parent 1afeaa324d
commit 6a99e7e273
11 changed files with 943 additions and 3 deletions

View File

@@ -34,6 +34,22 @@ endif()
if(APPLE)
wx_lib_link_libraries(webview PUBLIC "-framework WebKit")
elseif(WXMSW)
if(wxUSE_WEBVIEW_EDGE)
wx_lib_include_directories(webview PRIVATE ${PROJECT_SOURCE_DIR}/3rdparty/webview2/build/native/include)
if (${CMAKE_SIZEOF_VOID_P} EQUAL 4)
set(WEBVIEW2_ARCH x86)
else()
set(WEBVIEW2_ARCH x64)
endif()
wx_lib_link_libraries(webview PUBLIC "${PROJECT_SOURCE_DIR}/3rdparty/webview2/build/native/${WEBVIEW2_ARCH}/WebView2Loader.dll.lib")
add_custom_command(TARGET webview POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
"${PROJECT_SOURCE_DIR}/3rdparty/webview2/build/native/${WEBVIEW2_ARCH}/WebView2Loader.dll"
$<TARGET_FILE_DIR:webview>/"WebView2Loader.dll")
endif()
elseif(WXGTK)
if(LIBSOUP_FOUND)
wx_lib_include_directories(webview PUBLIC ${LIBSOUP_INCLUDE_DIRS})