configure/CMakelists: Use Python_EXECUTABLE as hint for interpreter

The PYTHON_EXECUTABLE variable was only interpreted by our own FindPythonDev.
cmake's FindPython uses Python_EXECUTABLE instead.

Also, if --with-python is not used, prefer unversioned executables that
match the version requirement. Further, remove Python_ADDITIONAL_VERSIONS
that is interpreted by FindPythonInterp which we're not using anymore.

https://cmake.org/cmake/help/latest/module/FindPython.html#artifacts-specification
https://cmake.org/cmake/help/latest/module/FindPythonInterp.html

Closes #3275
This commit is contained in:
Arne Welzel 2023-09-07 11:37:56 +02:00
parent 21562cfbb2
commit 09b7caf986
2 changed files with 2 additions and 2 deletions

2
configure vendored
View file

@ -365,7 +365,7 @@ while [ $# -ne 0 ]; do
append_cache_entry OPENSSL_ROOT_DIR PATH $optarg
;;
--with-python=*)
append_cache_entry PYTHON_EXECUTABLE PATH $optarg
append_cache_entry Python_EXECUTABLE PATH $optarg
;;
--with-python-inc=*)
append_cache_entry PYTHON_INCLUDE_DIR PATH $optarg