diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2019-07-01 21:26:48 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2019-07-01 21:28:33 +0200 |
commit | ab81128a7aa7944201725000420662b33f22d1ec (patch) | |
tree | 081d4cd4cc49a6391349c59df07534def8fab1a3 /cmake/FindPython.cmake | |
parent | f9b6f359dd34197e1917fede36496a68e3c4c17a (diff) | |
download | weechat-ab81128a7aa7944201725000420662b33f22d1ec.zip |
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.
Diffstat (limited to 'cmake/FindPython.cmake')
-rw-r--r-- | cmake/FindPython.cmake | 12 |
1 files changed, 6 insertions, 6 deletions
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() |