mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-10-31 23:26:22 +00:00
More fixes for CMake 3.27
This commit is contained in:
parent
9b5739603a
commit
0da7fc6704
@ -60,10 +60,22 @@ if(CMAKE_VERSION VERSION_LESS 3.12 OR CMAKE_CROSSCOMPILING)
|
||||
else()
|
||||
message(STATUS "PYTHON_EXECUTABLE not set - trying by default python3")
|
||||
set(Python_ADDITIONAL_VERSIONS 3.4 3.5 3.6 3.7 3.8 3.9)
|
||||
find_package(PythonInterp ${GNSSSDR_PYTHON_MIN3_VERSION})
|
||||
if(CMAKE_VERSION VERSION_LESS "3.27")
|
||||
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION})
|
||||
else()
|
||||
find_package(Python COMPONENTS Interpreter)
|
||||
set(PYTHONINTERP_FOUND Python_Interpreter_FOUND)
|
||||
set(PYTHON_VERSION_STRING "${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}")
|
||||
endif()
|
||||
if(NOT PYTHONINTERP_FOUND)
|
||||
message(STATUS "python3 not found - trying with python2.7")
|
||||
find_package(PythonInterp ${GNSSSDR_PYTHON_MIN_VERSION} REQUIRED)
|
||||
if(CMAKE_VERSION VERSION_LESS "3.27")
|
||||
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION})
|
||||
else()
|
||||
find_package(Python2 COMPONENTS Interpreter)
|
||||
set(PYTHONINTERP_FOUND Python2_Interpreter_FOUND)
|
||||
set(PYTHON_VERSION_STRING "${Python2_VERSION_MAJOR}.${Python2_VERSION_MINOR}")
|
||||
endif()
|
||||
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)
|
||||
@ -97,8 +109,12 @@ else()
|
||||
endif()
|
||||
if(NOT MAKO_FOUND OR NOT SIX_FOUND)
|
||||
unset(PYTHON_EXECUTABLE)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.27)
|
||||
find_package(PythonInterp ${GNSSSDR_PYTHON_MIN_VERSION})
|
||||
if(CMAKE_VERSION VERSION_LESS "3.27")
|
||||
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION})
|
||||
else()
|
||||
find_package(Python COMPONENTS Interpreter)
|
||||
set(PYTHONINTERP_FOUND Python_Interpreter_FOUND)
|
||||
set(PYTHON_VERSION_STRING "${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}")
|
||||
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)
|
||||
|
@ -73,6 +73,10 @@ else()
|
||||
message(STATUS "User set python executable ${PYTHON_EXECUTABLE}")
|
||||
if(CMAKE_VERSION VERSION_LESS "3.27")
|
||||
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION} REQUIRED)
|
||||
else()
|
||||
find_package(Python COMPONENTS Interpreter)
|
||||
set(PYTHONINTERP_FOUND Python_Interpreter_FOUND)
|
||||
set(PYTHON_VERSION_STRING "${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}")
|
||||
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")
|
||||
@ -106,6 +110,10 @@ else()
|
||||
unset(PYTHON_EXECUTABLE)
|
||||
if(CMAKE_VERSION VERSION_LESS "3.27")
|
||||
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION})
|
||||
else()
|
||||
find_package(Python COMPONENTS Interpreter)
|
||||
set(PYTHONINTERP_FOUND Python_Interpreter_FOUND)
|
||||
set(PYTHON_VERSION_STRING "${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}")
|
||||
endif()
|
||||
volk_python_check_module("mako >= 0.4.2" mako "mako.__version__ >= '0.4.2'" MAKO_FOUND)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user