mirror of
https://github.com/chenasraf/webview_cef.git
synced 2026-05-18 01:49:03 +00:00
fix opengl support, add support file
This commit is contained in:
@@ -20,6 +20,13 @@ add_executable(${BINARY_NAME} WIN32
|
||||
# that need different build settings.
|
||||
apply_standard_settings(${BINARY_NAME})
|
||||
|
||||
# Add preprocessor definitions for the build version.
|
||||
target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"")
|
||||
target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}")
|
||||
target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}")
|
||||
target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}")
|
||||
target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}")
|
||||
|
||||
# Disable Windows macros that collide with C++ standard library functions.
|
||||
target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
|
||||
|
||||
|
||||
@@ -60,14 +60,14 @@ IDI_APP_ICON ICON "resources\\app_icon.ico"
|
||||
// Version
|
||||
//
|
||||
|
||||
#ifdef FLUTTER_BUILD_NUMBER
|
||||
#define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER
|
||||
#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD)
|
||||
#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD
|
||||
#else
|
||||
#define VERSION_AS_NUMBER 1,0,0
|
||||
#define VERSION_AS_NUMBER 1,0,0,0
|
||||
#endif
|
||||
|
||||
#ifdef FLUTTER_BUILD_NAME
|
||||
#define VERSION_AS_STRING #FLUTTER_BUILD_NAME
|
||||
#if defined(FLUTTER_VERSION)
|
||||
#define VERSION_AS_STRING FLUTTER_VERSION
|
||||
#else
|
||||
#define VERSION_AS_STRING "1.0.0"
|
||||
#endif
|
||||
|
||||
@@ -69,14 +69,37 @@ set(webview_cef_bundled_libraries
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cefbins/resources/locales"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cefbins/resources/icudtl.dat"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cefbins/resources/resources.pak"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cefbins/resources/chrome_100_percent.pak"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cefbins/resources/chrome_200_percent.pak"
|
||||
$<$<CONFIG:Debug>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/debug/bin/chrome_elf.dll>
|
||||
$<$<CONFIG:Debug>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/debug/bin/libcef.dll>
|
||||
$<$<CONFIG:Debug>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/debug/bin/v8_context_snapshot.bin>
|
||||
$<$<CONFIG:Debug>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/debug/bin/swiftshader>
|
||||
$<$<CONFIG:Debug>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/debug/bin/d3dcompiler_47.dll>
|
||||
$<$<CONFIG:Debug>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/debug/bin/libEGL.dll>
|
||||
$<$<CONFIG:Debug>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/debug/bin/libGLESv2.dll>
|
||||
$<$<CONFIG:Debug>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/debug/bin/vulkan-1.dll>
|
||||
$<$<CONFIG:Debug>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/debug/bin/vk_swiftshader.dll>
|
||||
$<$<CONFIG:Debug>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/debug/bin/vk_swiftshader_icd.json>
|
||||
$<$<CONFIG:Release>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/release/bin/chrome_elf.dll>
|
||||
$<$<CONFIG:Release>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/release/bin/libcef.dll>
|
||||
$<$<CONFIG:Release>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/release/bin/v8_context_snapshot.bin>
|
||||
$<$<CONFIG:Release>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/release/bin/swiftshader>
|
||||
$<$<CONFIG:Release>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/release/bin/d3dcompiler_47.dll>
|
||||
$<$<CONFIG:Release>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/release/bin/libEGL.dll>
|
||||
$<$<CONFIG:Release>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/release/bin/libGLESv2.dll>
|
||||
$<$<CONFIG:Release>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/release/bin/vulkan-1.dll>
|
||||
$<$<CONFIG:Release>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/release/bin/vk_swiftshader.dll>
|
||||
$<$<CONFIG:Release>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/release/bin/vk_swiftshader_icd.json>
|
||||
$<$<CONFIG:Profile>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/release/bin/chrome_elf.dll>
|
||||
$<$<CONFIG:Profile>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/release/bin/libcef.dll>
|
||||
$<$<CONFIG:Profile>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/release/bin/v8_context_snapshot.bin>
|
||||
$<$<CONFIG:Profile>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/release/bin/swiftshader>
|
||||
$<$<CONFIG:Profile>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/release/bin/d3dcompiler_47.dll>
|
||||
$<$<CONFIG:Profile>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/release/bin/libEGL.dll>
|
||||
$<$<CONFIG:Profile>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/release/bin/libGLESv2.dll>
|
||||
$<$<CONFIG:Profile>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/release/bin/vulkan-1.dll>
|
||||
$<$<CONFIG:Profile>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/release/bin/vk_swiftshader.dll>
|
||||
$<$<CONFIG:Profile>:${CMAKE_CURRENT_SOURCE_DIR}/cefbins/release/bin/vk_swiftshader_icd.json>
|
||||
PARENT_SCOPE)
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ endfunction()
|
||||
|
||||
function(preparePrebuiltFiles)
|
||||
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/cefbins/debug")
|
||||
download_file(https://github.com/hlwhl/webview_cef/releases/download/prebuilt_cef_bin/webview_cef_bin_0.0.1_101.0.18+chromium-101.0.4951.67_windows64.zip ${CMAKE_CURRENT_SOURCE_DIR}/prebuilt.zip)
|
||||
download_file(https://github.com/hlwhl/webview_cef/releases/download/prebuilt_cef_bin_windows/webview_cef_bin_0.0.2_101.0.18+chromium-101.0.4951.67_windows64.zip ${CMAKE_CURRENT_SOURCE_DIR}/prebuilt.zip)
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cefbins)
|
||||
extract_file(${CMAKE_CURRENT_SOURCE_DIR}/prebuilt.zip ${CMAKE_CURRENT_SOURCE_DIR}/cefbins)
|
||||
file(REMOVE_RECURSE ${CMAKE_CURRENT_SOURCE_DIR}/prebuilt.zip)
|
||||
|
||||
Reference in New Issue
Block a user