CMake: Modernize build files using outdated Python variables.

This commit is contained in:
Joao Matos
2025-02-15 20:04:22 +00:00
committed by Chris Hennes
parent de9bd5e1ce
commit 27ebc68a11
72 changed files with 113 additions and 124 deletions

View File

@@ -3,18 +3,7 @@ macro(SetupPython)
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
# For backwards compatibility with old CMake scripts
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
set(PYTHON_LIBRARIES ${Python3_LIBRARIES})
set(PYTHON_INCLUDE_DIRS ${Python3_INCLUDE_DIRS})
set(PYTHON_LIBRARY_DIRS ${Python3_LIBRARY_DIRS})
set(PYTHON_VERSION_STRING ${Python3_VERSION})
set(PYTHON_VERSION_MAJOR ${Python3_VERSION_MAJOR})
set(PYTHON_VERSION_MINOR ${Python3_VERSION_MINOR})
set(PYTHON_VERSION_PATCH ${Python3_VERSION_PATCH})
set(PYTHONINTERP_FOUND ${Python3_Interpreter_FOUND})
if (${PYTHON_VERSION_STRING} VERSION_LESS "3.8")
if (${Python3_VERSION} VERSION_LESS "3.8")
message(FATAL_ERROR "To build FreeCAD you need at least Python 3.8\n")
endif()