File: cmake4.patch

package info (click to toggle)
dnf-plugins-core 4.10.1-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,752 kB
  • sloc: python: 7,441; sh: 23; makefile: 15; xml: 7
file content (32 lines) | stat: -rw-r--r-- 1,064 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Author: Petr Pisar <ppisar@redhat.com>
Description: fix building with CMake 4
Origin: https://github.com/rpm-software-management/dnf-plugins-core/commit/1f5d725d857b61760174dd09165e885dd63762c5
Forwarded: https://github.com/rpm-software-management/dnf-plugins-core/pull/589
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,5 @@
+CMAKE_MINIMUM_REQUIRED (VERSION 3.5.0...4.0.2)
 PROJECT (dnf-plugins-core NONE)
-CMAKE_MINIMUM_REQUIRED (VERSION 2.4)
 
 if (NOT WITHOUT_DEBUG)
     set (WITHOUT_DEBUG "0")
@@ -9,6 +9,7 @@
     set (WITHOUT_LOCAL "0")
 endif()
 
+CMAKE_POLICY (SET CMP0148 OLD)
 IF (NOT PYTHON_DESIRED)
     FIND_PACKAGE (PythonInterp REQUIRED)
 ELSEIF (${PYTHON_DESIRED} STREQUAL "2")
--- a/dnf-plugins-core.spec
+++ b/dnf-plugins-core.spec
@@ -48,7 +48,7 @@
 URL:            https://github.com/rpm-software-management/dnf-plugins-core
 Source0:        %{url}/archive/%{version}/%{name}-%{version}.tar.gz
 BuildArch:      noarch
-BuildRequires:  cmake
+BuildRequires:  cmake >= 3.5.0
 BuildRequires:  gettext
 # Documentation
 %if %{with python3}