Changeset View
Changeset View
Standalone View
Standalone View
files/0001-Replace-FindPythonLibs-with-FindPython3-in-CMake.patch
- This file was added.
| 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 | |||||
Copyright © 2015-2021 Solus Project. The Solus logo is Copyright © 2016-2021 Solus Project. All Rights Reserved.