mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-26 00:46:59 +00:00
Look for python3 in first place even if CMake < 3.12
This commit is contained in:
parent
8eed17f8b3
commit
51c8732ff1
@ -71,12 +71,12 @@ if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||
gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
|
||||
gnsssdr_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
|
||||
else()
|
||||
message(STATUS "PYTHON_EXECUTABLE not set - trying by default python2")
|
||||
message(STATUS "Use -DPYTHON_EXECUTABLE=/path/to/python3 to build for python3.")
|
||||
find_package(PythonInterp ${GNSSSDR_PYTHON_MIN_VERSION})
|
||||
message(STATUS "PYTHON_EXECUTABLE not set - trying by default python3")
|
||||
message(STATUS "Use -DPYTHON_EXECUTABLE=/path/to/python2.7 to build for python 2.7")
|
||||
find_package(PythonInterp ${GNSSSDR_PYTHON_MIN3_VERSION})
|
||||
if(NOT PYTHONINTERP_FOUND)
|
||||
message(STATUS "python2 not found - trying with python3")
|
||||
find_package(PythonInterp ${GNSSSDR_PYTHON3_MIN_VERSION} REQUIRED)
|
||||
message(STATUS "python3 not found - trying with python2.7")
|
||||
find_package(PythonInterp ${GNSSSDR_PYTHON_MIN_VERSION} REQUIRED)
|
||||
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)
|
||||
|
@ -45,7 +45,7 @@ First, make sure that the required dependencies are installed in your
|
||||
machine:
|
||||
|
||||
~~~~~~
|
||||
$ sudo apt-get install cmake python-mako python-six libboost-dev \
|
||||
$ sudo apt-get install cmake python3-mako python3-six libboost-dev \
|
||||
libboost-filesystem-dev libboost-system-dev
|
||||
~~~~~~
|
||||
|
||||
|
@ -69,12 +69,12 @@ if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||
message(STATUS "User set python executable ${PYTHON_EXECUTABLE}")
|
||||
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION} REQUIRED)
|
||||
else()
|
||||
message(STATUS "PYTHON_EXECUTABLE not set - using default python2")
|
||||
message(STATUS "Use -DPYTHON_EXECUTABLE=/path/to/python3 to build for python3.")
|
||||
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION})
|
||||
message(STATUS "PYTHON_EXECUTABLE not set - trying by default python3")
|
||||
message(STATUS "Use -DPYTHON_EXECUTABLE=/path/to/python to build for python 2.7")
|
||||
find_package(PythonInterp ${VOLK_PYTHON_MIN3_VERSION})
|
||||
if(NOT PYTHONINTERP_FOUND)
|
||||
message(STATUS "python2 not found - using python3")
|
||||
find_package(PythonInterp ${VOLK_PYTHON3_MIN_VERSION} REQUIRED)
|
||||
message(STATUS "python3 not found - trying with python2.7")
|
||||
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION} REQUIRED)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
|
Loading…
Reference in New Issue
Block a user