mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Don't require Python 3 for Qt5.
Use separate ENABLE_PYTHON3 option for Python 3.
This commit is contained in:
parent
f8175d33ef
commit
81c5f25a7f
@ -678,11 +678,12 @@ ENDIF (UNIX AND NOT APPLE)
|
||||
#############################################################
|
||||
# Python build dependency
|
||||
|
||||
IF(ENABLE_QT5)
|
||||
SET (ENABLE_PYTHON3 ${ENABLE_QT5} CACHE BOOL "If enabled will try to find Python 3 before looking for Python 2")
|
||||
IF(ENABLE_PYTHON3)
|
||||
SET(PYTHON_VER 3 CACHE STRING "Python version")
|
||||
ELSE(ENABLE_QT5)
|
||||
ELSE(ENABLE_PYTHON3)
|
||||
SET(PYTHON_VER 2.7 CACHE STRING "Python version")
|
||||
ENDIF(ENABLE_QT5)
|
||||
ENDIF(ENABLE_PYTHON3)
|
||||
|
||||
FIND_PACKAGE(PythonInterp ${PYTHON_VER} REQUIRED)
|
||||
|
||||
@ -720,7 +721,11 @@ IF (WITH_BINDINGS)
|
||||
ENDIF (NOT BINDINGS_GLOBAL_INSTALL)
|
||||
|
||||
IF (WITH_CUSTOM_WIDGETS)
|
||||
SET(PYUIC_WIDGET_PLUGIN_DIRECTORY ${PYQT4_MOD_DIR}/uic/widget-plugins/)
|
||||
IF(ENABLE_QT5)
|
||||
SET(PYUIC_WIDGET_PLUGIN_DIRECTORY ${PYQT5_MOD_DIR}/uic/widget-plugins/)
|
||||
ELSE(ENABLE_QT5)
|
||||
SET(PYUIC_WIDGET_PLUGIN_DIRECTORY ${PYQT4_MOD_DIR}/uic/widget-plugins/)
|
||||
ENDIF(ENABLE_QT5)
|
||||
ENDIF (WITH_CUSTOM_WIDGETS)
|
||||
|
||||
ENDIF (WITH_BINDINGS)
|
||||
|
@ -36,6 +36,7 @@ cmake \
|
||||
-DWITH_ASTYLE=ON \
|
||||
-DWITH_SERVER=ON \
|
||||
-DENABLE_QT5=ON \
|
||||
-DENABLE_PYTHON3=ON \
|
||||
-DCXX_EXTRA_FLAGS="$CLANG_WARNINGS" \
|
||||
-DPYTHON_LIBRARY=/usr/lib/libpython3.2mu.so \
|
||||
..
|
||||
|
@ -47,7 +47,7 @@ except ImportError:
|
||||
'pyqt_version': PyQt5.QtCore.PYQT_VERSION,
|
||||
'pyqt_version_str': PyQt5.QtCore.PYQT_VERSION_STR,
|
||||
'pyqt_sip_flags': PyQt5.QtCore.PYQT_CONFIGURATION['sip_flags'],
|
||||
'pyqt_mod_dir': cfg.default_mod_dir,
|
||||
'pyqt_mod_dir': os.path.join(cfg.default_mod_dir, "PyQt5"),
|
||||
'pyqt_sip_dir': sip_dir,
|
||||
'pyqt_bin_dir': cfg.default_bin_dir,
|
||||
}
|
||||
|
@ -44,11 +44,11 @@ else(EXISTS "${PYTHON_INCLUDE_PATH}" AND EXISTS "${PYTHON_LIBRARY}" AND EXISTS "
|
||||
endif("${PYTHON_CUSTOM_FRAMEWORK}" MATCHES "Python\\.framework")
|
||||
endif(APPLE AND PYTHON_CUSTOM_FRAMEWORK)
|
||||
|
||||
IF (ENABLE_QT5)
|
||||
IF (ENABLE_PYTHON3)
|
||||
FIND_PACKAGE(PythonInterp 3)
|
||||
ELSE (ENABLE_QT5)
|
||||
ELSE (ENABLE_PYTHON3)
|
||||
FIND_PACKAGE(PythonInterp 2.7)
|
||||
ENDIF (ENABLE_QT5)
|
||||
ENDIF (ENABLE_PYTHON3)
|
||||
|
||||
if(PYTHONINTERP_FOUND)
|
||||
FIND_FILE(_find_lib_python_py FindLibPython.py PATHS ${CMAKE_MODULE_PATH})
|
||||
|
Loading…
x
Reference in New Issue
Block a user