From 906e46051ccd609da78f36ba9fa1c9233c58c6c0 Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Fri, 22 Aug 2025 14:22:23 +0800 Subject: [PATCH] fix build with cmake 4 --- bump-up-cmake-version-requirements.patch | 34 ++++++++++++++++++++++++ glm.spec | 7 +++-- 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 bump-up-cmake-version-requirements.patch diff --git a/bump-up-cmake-version-requirements.patch b/bump-up-cmake-version-requirements.patch new file mode 100644 index 0000000..68a819a --- /dev/null +++ b/bump-up-cmake-version-requirements.patch @@ -0,0 +1,34 @@ +From 7ca14fa0d0ba70e9912995cf028d5b02706cf0d4 Mon Sep 17 00:00:00 2001 +From: Funda Wang +Date: Fri, 22 Aug 2025 14:18:35 +0800 +Subject: [PATCH] bump up cmake version requirements + +--- + CMakeLists.txt | 3 +-- + test/cmake/CMakeLists.txt | 2 +- + 2 files changed, 2 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bc7a745..fb25ccc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,5 +1,4 @@ +-cmake_minimum_required(VERSION 3.2 FATAL_ERROR) +-cmake_policy(VERSION 3.2) ++cmake_minimum_required(VERSION 3.12 FATAL_ERROR) + + set(GLM_VERSION "0.9.9") + project(glm VERSION ${GLM_VERSION} LANGUAGES CXX) +diff --git a/test/cmake/CMakeLists.txt b/test/cmake/CMakeLists.txt +index 5bc11ef..546db3d 100644 +--- a/test/cmake/CMakeLists.txt ++++ b/test/cmake/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 3.2 FATAL_ERROR) ++cmake_minimum_required(VERSION 3.12 FATAL_ERROR) + project(test_find_glm) + + find_package(glm REQUIRED) +-- +2.50.1 + diff --git a/glm.spec b/glm.spec index 89d4f70..eea8982 100644 --- a/glm.spec +++ b/glm.spec @@ -3,14 +3,14 @@ Name: glm Version: 0.9.9.8 -Release: 3 +Release: 4 Summary: C++ mathematics library for graphics programming License: MIT URL: https://glm.g-truc.net/ Source0: https://github.com/g-truc/glm/releases/download/%{version}/%{name}-%{version}.tar.gz Patch0: fix-tests-big-endian-and-installation.patch - +Patch1: bump-up-cmake-version-requirements.patch BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cmake >= 3.14 @@ -78,6 +78,9 @@ rmdir $RPM_BUILD_ROOT%{_libdir} %doc doc/manual.pdf %changelog +* Fri Aug 22 2025 Funda Wang - 0.9.9.8-4 +- fix build with cmake 4 + * Wed Nov 06 2024 Funda Wang - 0.9.9.8-3 - adopt to new cmake macro -- Gitee