mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-31 11:19:18 +00:00
Fix breaking change in CMake 3.27: PythonInterp was removed
This commit is contained in:
parent
7d091afc26
commit
b16c1de541
@ -1116,7 +1116,7 @@ if(NOT VOLKGNSSSDR_FOUND)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(PYTHONINTERP_FOUND)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.27 AND PYTHONINTERP_FOUND)
|
||||
set_package_properties(PythonInterp PROPERTIES
|
||||
URL "https://www.python.org/"
|
||||
DESCRIPTION "An interpreted, high-level, general-purpose programming language (found: v${PYTHON_VERSION_STRING})"
|
||||
|
@ -97,7 +97,9 @@ else()
|
||||
endif()
|
||||
if(NOT MAKO_FOUND OR NOT SIX_FOUND)
|
||||
unset(PYTHON_EXECUTABLE)
|
||||
find_package(PythonInterp ${GNSSSDR_PYTHON_MIN_VERSION})
|
||||
if(CMAKE_VERSION VERSION_LESS 3.27)
|
||||
find_package(PythonInterp ${GNSSSDR_PYTHON_MIN_VERSION})
|
||||
endif()
|
||||
gnsssdr_python_check_module("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
|
||||
gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
|
||||
if(PYTHON_VERSION_STRING VERSION_LESS "3.0")
|
||||
|
@ -71,7 +71,9 @@ if(CMAKE_VERSION VERSION_LESS 3.12 OR CMAKE_CROSSCOMPILING)
|
||||
else()
|
||||
if(PYTHON_EXECUTABLE)
|
||||
message(STATUS "User set python executable ${PYTHON_EXECUTABLE}")
|
||||
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION} REQUIRED)
|
||||
if(CMAKE_VERSION VERSION_LESS "3.27")
|
||||
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION} REQUIRED)
|
||||
endif()
|
||||
volk_python_check_module("mako >= 0.4.2" mako "mako.__version__ >= '0.4.2'" MAKO_FOUND)
|
||||
if(PYTHON_VERSION_STRING VERSION_LESS "3.0")
|
||||
volk_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
|
||||
@ -102,15 +104,19 @@ else()
|
||||
endif()
|
||||
if(NOT MAKO_FOUND OR NOT SIX_FOUND)
|
||||
unset(PYTHON_EXECUTABLE)
|
||||
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION})
|
||||
if(CMAKE_VERSION VERSION_LESS "3.27")
|
||||
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION})
|
||||
endif()
|
||||
volk_python_check_module("mako >= 0.4.2" mako "mako.__version__ >= '0.4.2'" MAKO_FOUND)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(${PYTHON_VERSION_MAJOR} VERSION_EQUAL 3)
|
||||
set(PYTHON3 TRUE)
|
||||
if(CMAKE_VERSION VERSION_LESS "3.27")
|
||||
if(${PYTHON_VERSION_MAJOR} VERSION_EQUAL 3)
|
||||
set(PYTHON3 TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user