File kexi-cmake4.patch of Package kexi5
From a5d803937189f9e61e25309681483c97b83d3dbe Mon Sep 17 00:00:00 2001
From: Christophe Marin <christophe@krop.fr>
Date: Thu, 20 Mar 2025 14:12:48 +0100
Subject: [PATCH] Make kexi compatible with CMake 4
- Bump the minimum version to 3.16.
- Remove obsolete CMake policies
---
CMakeLists.txt | 3 ++-
cmake/modules/SetKexiCMakePolicies.cmake | 3 ---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0b2fffe..122843b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,5 @@
-cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
+
find_package(ECM 1.8.0 REQUIRED NOMODULE)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
include(SetKexiCMakePolicies NO_POLICY_SCOPE)
diff --git a/cmake/modules/SetKexiCMakePolicies.cmake b/cmake/modules/SetKexiCMakePolicies.cmake
index bc28d8a..bd400c2 100644
--- a/cmake/modules/SetKexiCMakePolicies.cmake
+++ b/cmake/modules/SetKexiCMakePolicies.cmake
@@ -8,9 +8,6 @@ cmake_policy(SET CMP0048 NEW) # for PROJECT_VERSION
cmake_policy(SET CMP0053 NEW) # TODO remove, temporary fix for a bug in Qt 5.8's Qt5ModuleLocation.cmake
# "Simplify variable reference and escape sequence evaluation"
-if(POLICY CMP0059) # Don’t treat DEFINITIONS as a built-in directory property.
- cmake_policy(SET CMP0059 OLD)
-endif()
if(POLICY CMP0063) # Honor visibility properties for all target types (since cmake 3.3)
cmake_policy(SET CMP0063 NEW)
endif()
--
2.49.0