Fix find python for cmake <3.12 and >= 3.12
Compare changes
+ 4
− 2
@@ -80,6 +80,8 @@ else() # Use old, deprecated means of detecting python.
@@ -92,9 +94,9 @@ message(STATUS "Using python version ${Python3_VERSION}")
CMakeLists.txt used the variables ${PYTHON_VERSION_MAJOR} and ${PYTHON_VERSION_MINOR} to set the ${PYTHON_INSTALL_PATH} The correct names of the intended variables are ${Python3_VERSION_MAJOR} and ${Python3_VERSION_MINOR}. These are set by cmake system module FindPython3.cmake. This module is only available from cmake 3.12 onwards. For versions <3.12 we emulate the FindPython3.cmake behaviour.