diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b5ecfab65d..1c825717b4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -10,6 +10,7 @@ SET (CONFIG_VERSION_TAG "Dev") option(ENABLE_HTML "Enable HTML module, require CEF" ON) # Add custom cmake modules path +SET (CASPARCG_PATCH_DIR ${CMAKE_SOURCE_DIR}/CMakeModules/patches) LIST (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMakeModules) # Determine the git hash diff --git a/src/CMakeModules/Bootstrap_Linux.cmake b/src/CMakeModules/Bootstrap_Linux.cmake index 193e575c04..34dc01c98a 100644 --- a/src/CMakeModules/Bootstrap_Linux.cmake +++ b/src/CMakeModules/Bootstrap_Linux.cmake @@ -44,6 +44,7 @@ if (ENABLE_HTML) DOWNLOAD_DIR ${CASPARCG_DOWNLOAD_CACHE} CMAKE_ARGS -DUSE_SANDBOX=Off INSTALL_COMMAND "" + PATCH_COMMAND git apply ${CASPARCG_PATCH_DIR}/cef117.patch BUILD_BYPRODUCTS "/Release/libcef.so" "/libcef_dll_wrapper/libcef_dll_wrapper.a" diff --git a/src/CMakeModules/Bootstrap_Windows.cmake b/src/CMakeModules/Bootstrap_Windows.cmake index 316cde3c06..2290c6e070 100644 --- a/src/CMakeModules/Bootstrap_Windows.cmake +++ b/src/CMakeModules/Bootstrap_Windows.cmake @@ -208,6 +208,7 @@ if (ENABLE_HTML) DOWNLOAD_DIR ${CASPARCG_DOWNLOAD_CACHE} CMAKE_ARGS -DUSE_SANDBOX=Off -DCEF_RUNTIME_LIBRARY_FLAG=/MD INSTALL_COMMAND "" + PATCH_COMMAND git apply ${CASPARCG_PATCH_DIR}/cef117.patch ) ExternalProject_Get_Property(cef SOURCE_DIR) ExternalProject_Get_Property(cef BINARY_DIR) diff --git a/src/CMakeModules/patches/cef117.patch b/src/CMakeModules/patches/cef117.patch new file mode 100644 index 0000000000..55ff66f52e --- /dev/null +++ b/src/CMakeModules/patches/cef117.patch @@ -0,0 +1,16 @@ +--- CMakeLists.txt 2023-11-24 09:53:18.695186368 +0000 ++++ CMakeLists.txt 2023-11-24 09:54:17.970959700 +0000 +@@ -132,11 +132,8 @@ + # Global setup. + # + +-# For VS2022 and Xcode 12+ support. +-cmake_minimum_required(VERSION 3.21) +- +-# Only generate Debug and Release configuration types. +-set(CMAKE_CONFIGURATION_TYPES Debug Release) ++# VS2022 and Xcode 12+ support needs 3.21, but ubuntu22.04 ships with 3.20 ++cmake_minimum_required(VERSION 3.20) + + # Project name. + # TODO: Change this line to match your project name when you copy this file.