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}
|