From 77833f86fda89a5ba40db558e076e2e830158c70 Mon Sep 17 00:00:00 2001 From: GPayne Date: Sun, 15 May 2022 13:59:15 -0600 Subject: [PATCH] Added CMake copy of CEF resource files to avoid linux CEF runtime error --- modules/webbrowser/CMakeLists.txt | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/modules/webbrowser/CMakeLists.txt b/modules/webbrowser/CMakeLists.txt index 1a85d7dfc9..a07882f351 100644 --- a/modules/webbrowser/CMakeLists.txt +++ b/modules/webbrowser/CMakeLists.txt @@ -67,14 +67,10 @@ set(CEF_VERSION "91.1.23+g04c8d56+chromium-91.0.4472.164") #endif () # CEF Sandbox is not working with the latest Visual Studio, so we disable it for now. -if (WIN32) +if (WIN32 OR UNIX) option(USE_SANDBOX OFF) endif () -if (OS_LINUX) - set(USE_SANDBOX OFF) -endif () - # Add this project's cmake/ directory to the module path. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake") include(cef_support) @@ -272,3 +268,13 @@ foreach (j ${CEF_RESOURCE_FILES}) list(APPEND deps "${CEF_RESOURCE_DIR}/${j}") endforeach() add_external_library_dependencies("${deps}") + +# Linux needs to have copies of CEF files in Resources/ in its build-type dir to avoid +# the 'Couldn't mmap icu data file' runtime error +if (UNIX) + file(COPY ${CEF_ROOT}/Resources/ + DESTINATION ${CEF_ROOT}/${CMAKE_BUILD_TYPE}/ + FILES_MATCHING PATTERN * + ) +endif () +