From 9a8d5c1328e8a111c7af7a073e052a28da218ec0 Mon Sep 17 00:00:00 2001 From: Joerg Wunsch Date: Sun, 7 Apr 2024 09:55:15 +0200 Subject: [PATCH] Replace PYTHONLIBS by PYTHON3 in CMakeLists.txt https://cmake.org/cmake/help/latest/module/FindPython3.html --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 499afebc..e7bbc67b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -250,9 +250,11 @@ endif() # Find SWIG find_package(SWIG 4.0 COMPONENTS python) if(SWIG_FOUND) - find_package(PythonLibs REQUIRED) - if(PYTHONLIBS_FOUND) + find_package(Python3 COMPONENTS Interpreter Development) + if(PYTHON3_FOUND) set(HAVE_SWIG 1) + else() + message(STATUS "Found SWIG but no Python3 header/library; cannot use SWIG") endif() endif()