File 0001-Replace-FindPythonLibs-with-FindPython3-in-CMake.patch of Package kvirc
From 2c881f711d518bbe4db95bf183ddc946c12f7751 Mon Sep 17 00:00:00 2001
From: Alexey Sokolov <sokolov@google.com>
Date: Sun, 29 Dec 2019 23:26:31 +0000
Subject: [PATCH] Replace FindPythonLibs with FindPython3 in CMake
---
CMakeLists.txt | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1e07dd1..7e3607d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,7 +34,7 @@
###############################################################################
# Minimum CMake version
-cmake_minimum_required(VERSION 3.1.0)
+cmake_minimum_required(VERSION 3.12.0)
# Name of the project
project(kvirc)
@@ -748,12 +748,12 @@ endif()
# Check for Python support
option(WANT_PYTHON "Compile Python support" ON)
if(WANT_PYTHON)
- find_package(PythonLibs)
- if(PYTHONLIBS_FOUND)
+ find_package(Python3 COMPONENTS Development)
+ if(Python3_FOUND)
set(COMPILE_PYTHON_SUPPORT 1)
- set(CMAKE_STATUS_PYTHON_SUPPORT "Yes, Python ${PYTHONLIBS_VERSION_STRING}")
- list(APPEND LIBS ${PYTHON_LIBRARIES})
- include_directories(${PYTHON_INCLUDE_DIRS})
+ set(CMAKE_STATUS_PYTHON_SUPPORT "Yes, Python ${Python3_VERSION}")
+ list(APPEND LIBS ${Python3_LIBRARIES})
+ include_directories(${Python3_INCLUDE_DIRS})
else()
set(CMAKE_STATUS_PYTHON_SUPPORT "No, not found.")
endif()
--
2.25.0