add patches

This commit is contained in:
lod 2025-03-30 11:11:28 +02:00
parent 409398ee5a
commit cecbc03a50
2 changed files with 82 additions and 0 deletions

44
cmake=min-version.patch Normal file
View file

@ -0,0 +1,44 @@
diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt
index b24ee20e2..e59edc7b6 100644
--- a/deps/CMakeLists.txt
+++ b/deps/CMakeLists.txt
@@ -128,6 +128,7 @@ if (NOT IS_CROSS_COMPILE OR NOT APPLE)
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/${projectname}
${_gen}
CMAKE_ARGS
+ -DCMAKE_POLICY_VERSION_MINIMUM=3.5
-DCMAKE_INSTALL_PREFIX:STRING=${DESTDIR}
-DCMAKE_MODULE_PATH:STRING=${PROJECT_SOURCE_DIR}/../cmake/modules
-DCMAKE_PREFIX_PATH:STRING=${DESTDIR}
@@ -157,6 +158,7 @@ elseif(FLATPAK)
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/${projectname}
${_gen}
CMAKE_ARGS
+ -DCMAKE_POLICY_VERSION_MINIMUM=3.5
-DCMAKE_INSTALL_PREFIX:STRING=${DESTDIR}
-DCMAKE_MODULE_PATH:STRING=${PROJECT_SOURCE_DIR}/../cmake/modules
-DCMAKE_PREFIX_PATH:STRING=${DESTDIR}
@@ -185,6 +187,7 @@ else()
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/${projectname}
${_gen}
CMAKE_ARGS
+ -DCMAKE_POLICY_VERSION_MINIMUM=3.5
-DCMAKE_INSTALL_PREFIX:STRING=${DESTDIR}
-DCMAKE_PREFIX_PATH:STRING=${DESTDIR}
-DBUILD_SHARED_LIBS:BOOL=OFF
diff --git a/deps/wxWidgets/wxWidgets.cmake b/deps/wxWidgets/wxWidgets.cmake
index 1097e6cfc..9cf27a790 100644
--- a/deps/wxWidgets/wxWidgets.cmake
+++ b/deps/wxWidgets/wxWidgets.cmake
@@ -25,9 +25,11 @@ endif ()
orcaslicer_add_cmake_project(
wxWidgets
GIT_REPOSITORY "https://github.com/SoftFever/Orca-deps-wxWidgets"
+ PATCH_COMMAND git apply ${CMAKE_CURRENT_LIST_DIR}/wxWidgets-cmake-min-version.patch
GIT_SHALLOW ON
DEPENDS ${PNG_PKG} ${ZLIB_PKG} ${EXPAT_PKG} ${TIFF_PKG} ${JPEG_PKG}
CMAKE_ARGS
+ -DCMAKE_POLICY_VERSION_MINIMUM=3.5
-DwxBUILD_PRECOMP=ON
${_wx_toolkit}
"-DCMAKE_DEBUG_POSTFIX:STRING="

View file

@ -0,0 +1,38 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4063020..d498b78 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,7 +7,7 @@
# Licence: wxWindows licence
#############################################################################
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
if(NOT CMAKE_CONFIGURATION_TYPES)
get_property(HAVE_MULTI_CONFIG_GENERATOR GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
diff --git a/build/cmake/modules/cotire.cmake b/build/cmake/modules/cotire.cmake
index bb69643..e91f7e4 100644
--- a/build/cmake/modules/cotire.cmake
+++ b/build/cmake/modules/cotire.cmake
@@ -37,7 +37,7 @@ set(__COTIRE_INCLUDED TRUE)
if (NOT CMAKE_SCRIPT_MODE_FILE)
cmake_policy(PUSH)
endif()
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
if (NOT CMAKE_SCRIPT_MODE_FILE)
cmake_policy(POP)
endif()
diff --git a/build/cmake/modules/cotire_test/CMakeLists.txt b/build/cmake/modules/cotire_test/CMakeLists.txt
index dd14262..6d865bc 100644
--- a/build/cmake/modules/cotire_test/CMakeLists.txt
+++ b/build/cmake/modules/cotire_test/CMakeLists.txt
@@ -1,6 +1,6 @@
# cotire example project
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
if (POLICY CMP0058)
# Ninja requires custom command byproducts to be explicit