mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
Cmake build: Prefer using pyton3 over python2
This commit is contained in:
parent
fb79d6ed4f
commit
0f3b1539e8
@ -729,19 +729,19 @@ if(GNUWIN32_DIR)
|
|||||||
list(APPEND CMAKE_PROGRAM_PATH "${GNUWIN32_DIR}/Python" )
|
list(APPEND CMAKE_PROGRAM_PATH "${GNUWIN32_DIR}/Python" )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(PythonInterp 2.7 QUIET)
|
# Search for python default version first
|
||||||
if(PYTHONINTERP_FOUND)
|
unset(PYTHON_EXECUTABLE CACHE)
|
||||||
if(PYTHON_VERSION_STRING VERSION_GREATER 2.8)
|
unset(LYX_PYTHON_EXECUTABLE CACHE)
|
||||||
unset(PYTHONINTERP_FOUND)
|
unset(PYTHON_VERSION_MAJOR)
|
||||||
endif()
|
unset(PYTHON_VERSION_MINOR)
|
||||||
endif()
|
unset(PYTHON_VERSION_STRING)
|
||||||
|
find_package(PythonInterp 3.3 QUIET)
|
||||||
if(NOT PYTHONINTERP_FOUND)
|
if(NOT PYTHONINTERP_FOUND)
|
||||||
unset(PYTHON_EXECUTABLE CACHE)
|
unset(PYTHON_EXECUTABLE CACHE)
|
||||||
unset(PYTHON_VERSION_MAJOR)
|
find_package(PythonInterp 2.0 REQUIRED)
|
||||||
unset(PYTHON_VERSION_MINOR)
|
if(NOT PYTHON_VERSION_STRING VERSION_LESS 2.8)
|
||||||
unset(PYTHON_VERSION_STRING)
|
message(FATAL_ERROR "Python interpreter found, but is not suitable")
|
||||||
find_package(PythonInterp 3.3 REQUIRED)
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(LYX_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "Python to be used by LyX")
|
set(LYX_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "Python to be used by LyX")
|
||||||
|
Loading…
Reference in New Issue
Block a user