Replace PYTHONLIBS by PYTHON3 in CMakeLists.txt

https://cmake.org/cmake/help/latest/module/FindPython3.html
This commit is contained in:
Joerg Wunsch
2024-04-07 09:55:15 +02:00
parent b39332d636
commit 9a8d5c1328

View File

@@ -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()