Skip to content

Commit d7c3790

Browse files
committed
build: patch cmake min version on freetype
Patch cmake_minimum_required version for freetype, using the version from https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests/352/diffs This fixes a failure when building with CMake 4, where compatibility with CMake versions < 3.5 has been removed (see https://cmake.org/cmake/help/latest/release/4.0.html#deprecated-and-removed-features)
1 parent ae02413 commit d7c3790

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

depends/packages/freetype.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ $(package)_download_path=https://download.savannah.gnu.org/releases/$(package)
44
$(package)_file_name=$(package)-$($(package)_version).tar.xz
55
$(package)_sha256_hash=8bee39bd3968c4804b70614a0a3ad597299ad0e824bc8aad5ce8aaf48067bde7
66
$(package)_build_subdir=build
7+
$(package)_patches += cmake_minimum.patch
78

89
define $(package)_set_vars
910
$(package)_config_opts := -DCMAKE_BUILD_TYPE=None -DBUILD_SHARED_LIBS=TRUE
@@ -12,6 +13,10 @@ define $(package)_set_vars
1213
$(package)_config_opts += -DCMAKE_DISABLE_FIND_PACKAGE_BrotliDec=TRUE
1314
endef
1415

16+
define $(package)_preprocess_cmds
17+
patch -p1 < $($(package)_patch_dir)/cmake_minimum.patch
18+
endef
19+
1520
define $(package)_config_cmds
1621
$($(package)_cmake) -S .. -B .
1722
endef
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
build: set minimum required CMake to 3.12
2+
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -97,7 +97,7 @@
6+
# FreeType explicitly marks the API to be exported and relies on the compiler
7+
# to hide all other symbols. CMake supports a C_VISBILITY_PRESET property
8+
# starting with 2.8.12.
9+
-cmake_minimum_required(VERSION 2.8.12)
10+
+cmake_minimum_required(VERSION 3.12)
11+
12+
if (NOT CMAKE_VERSION VERSION_LESS 3.3)
13+
# Allow symbol visibility settings also on static libraries. CMake < 3.3

0 commit comments

Comments
 (0)