From ab81128a7aa7944201725000420662b33f22d1ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Mon, 1 Jul 2019 21:26:48 +0200 Subject: core: compile with Python 3 by default The CMake option ENABLE_PYTHON3 is renamed to ENABLE_PYTHON2, to use Python 2 first then fallback on Python 3. In the same way, the configure option --enable-python3 is renamed to --enable-python2, to use Python 2 first then fallback on Python 3. --- cmake/FindPython.cmake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'cmake') diff --git a/cmake/FindPython.cmake b/cmake/FindPython.cmake index 354a08656..a5ba729ab 100644 --- a/cmake/FindPython.cmake +++ b/cmake/FindPython.cmake @@ -33,14 +33,14 @@ if(PYTHON_FOUND) set(PYTHON_FIND_QUIETLY TRUE) endif() -if(ENABLE_PYTHON3) +if(ENABLE_PYTHON2) find_program(PYTHON_EXECUTABLE - NAMES python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python3 python2.7 python2.6 python2.5 python + NAMES python2.7 python2.6 python2.5 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python3 python PATHS /usr/bin /usr/local/bin /usr/pkg/bin ) else() find_program(PYTHON_EXECUTABLE - NAMES python2.7 python2.6 python2.5 python + NAMES python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python3 python PATHS /usr/bin /usr/local/bin /usr/pkg/bin ) endif() @@ -65,14 +65,14 @@ if(PYTHON_EXECUTABLE) NAMES Python.h HINTS ${PYTHON_INC_DIR} ) - if(ENABLE_PYTHON3) + if(ENABLE_PYTHON2) find_library(PYTHON_LIBRARY - NAMES python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python3 python2.7 python2.6 python2.5 python + NAMES python2.7 python2.6 python2.5 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python3 python HINTS ${PYTHON_POSSIBLE_LIB_PATH} ) else() find_library(PYTHON_LIBRARY - NAMES python2.7 python2.6 python2.5 python + NAMES python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python3 python HINTS ${PYTHON_POSSIBLE_LIB_PATH} ) endif() -- cgit v1.2.3