mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Cmake preparation to support python3
This commit is contained in:
parent
c85ad29f11
commit
dbc4c71ef5
@ -608,8 +608,24 @@ foreach(_spell "ASPELL" "Enchant" "Hunspell")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
find_package(PythonInterp 2.7 QUIET)
|
||||
if(PYTHONINTERP_FOUND)
|
||||
if(PYTHON_VERSION_STRING VERSION_GREATER 2.8)
|
||||
unset(PYTHONINTERP_FOUND)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT PYTHONINTERP_FOUND)
|
||||
unset(PYTHON_EXECUTABLE CACHE)
|
||||
unset(PYTHON_VERSION_MAJOR)
|
||||
unset(PYTHON_VERSION_MINOR)
|
||||
unset(PYTHON_VERSION_STRING)
|
||||
find_package(PythonInterp 3.3 REQUIRED)
|
||||
endif()
|
||||
|
||||
set(LYX_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "Python to be used by LyX")
|
||||
|
||||
if(LYX_NLS)
|
||||
FIND_PROGRAM(LYX_PYTHON_EXECUTABLE python2 python HINTS ${GNUWIN32_DIR}/python)
|
||||
find_package(LyXGettext)
|
||||
if(LYX_PYTHON_EXECUTABLE AND GETTEXT_FOUND)
|
||||
add_subdirectory(po "${TOP_BINARY_DIR}/po")
|
||||
|
Loading…
Reference in New Issue
Block a user