From fd7b91d54467cd21c2fa66c47c2102eeacae5643 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 24 Jul 2018 13:57:11 +0200 Subject: [PATCH] Fix python version --- .../volk_gnsssdr/cmake/Modules/VolkPython.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cmake/Modules/VolkPython.cmake b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cmake/Modules/VolkPython.cmake index f54869396..9f29d2de7 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cmake/Modules/VolkPython.cmake +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cmake/Modules/VolkPython.cmake @@ -29,7 +29,7 @@ set(VOLK_PYTHON_MIN_VERSION "2.7") set(VOLK_PYTHON3_MIN_VERSION "3.4") if (PYTHON_EXECUTABLE) message(STATUS "User set python executable ${PYTHON_EXECUTABLE}") - find_package(PythonInterp ${VOLK_PYTHON3_MIN_VERSION} REQUIRED) + find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION} REQUIRED) else (PYTHON_EXECUTABLE) message(STATUS "PYTHON_EXECUTABLE not set - using default python2") message(STATUS "Use -DPYTHON_EXECUTABLE=/path/to/python3 to build for python3.") @@ -40,6 +40,10 @@ else (PYTHON_EXECUTABLE) endif(NOT PYTHONINTERP_FOUND) endif (PYTHON_EXECUTABLE) +if (${PYTHON_VERSION_MAJOR} VERSION_EQUAL 3) + set(PYTHON3 TRUE) +endif () + find_package(PythonLibs ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} EXACT) ########################################################################