Changeset View
Changeset View
Standalone View
Standalone View
plugins/extensions/pykrita/sip/CMakeLists.txt
1 | include(SIPMacros) | 1 | include(SIPMacros) | ||
---|---|---|---|---|---|
2 | 2 | | |||
3 | message( ${SIP_VERSION} " - The version of SIP found expressed as a 6 digit hex number suitable for comparison as a string.") | 3 | message( ${SIP_VERSION} " - The version of SIP found expressed as a 6 digit hex number suitable for comparison as a string.") | ||
4 | message( ${SIP_VERSION_STR} " - The version of SIP found as a human readable string.") | 4 | message( ${SIP_VERSION_STR} " - The version of SIP found as a human readable string.") | ||
5 | message( ${SIP_EXECUTABLE} " - Path and filename of the SIP command line executable.") | 5 | message( ${SIP_EXECUTABLE} " - Path and filename of the SIP command line executable.") | ||
6 | message( ${SIP_INCLUDE_DIR} " - Directory holding the SIP C++ header file.") | 6 | message( ${SIP_INCLUDE_DIR} " - Directory holding the SIP C++ header file.") | ||
7 | message( ${SIP_DEFAULT_SIP_DIR} " - default SIP dir" ) | 7 | message( ${SIP_DEFAULT_SIP_DIR} " - default SIP dir" ) | ||
8 | 8 | | |||
9 | set(SIP_INCLUDES | 9 | set(SIP_INCLUDES | ||
10 | ${SIP_DEFAULT_SIP_DIR} | 10 | ${SIP_DEFAULT_SIP_DIR} | ||
11 | ${PYQT5_SIP_DIR} | 11 | ${PYQT5_SIP_DIR} | ||
12 | ${PYQT_SIP_DIR_OVERRIDE} | 12 | ${PYQT_SIP_DIR_OVERRIDE} | ||
13 | ./krita) | 13 | ./krita) | ||
14 | 14 | | |||
15 | if(${PYQT5_VERSION_STR} VERSION_EQUAL "5.11.0" OR ${PYQT5_VERSION_STR} VERSION_GREATER "5.11.0") | | |||
16 | set(SIP_NAME -n PyQt5.sip) | | |||
17 | endif() | | |||
18 | | ||||
19 | set(SIP_CONCAT_PARTS 1) | 15 | set(SIP_CONCAT_PARTS 1) | ||
20 | set(SIP_TAGS ALL WS_X11 ${PYQT5_VERSION_TAG}) | 16 | set(SIP_TAGS ALL WS_X11 ${PYQT5_VERSION_TAG}) | ||
21 | set(SIP_EXTRA_OPTIONS -g -x PyKDE_QVector ${SIP_NAME}) | 17 | set(SIP_EXTRA_OPTIONS -g -x PyKDE_QVector ${PYQT5_SIP_NAME}) | ||
22 | 18 | | |||
23 | set(PYTHON_SITE_PACKAGES_INSTALL_DIR ${LIB_INSTALL_DIR}/krita-python-libs) | 19 | set(PYTHON_SITE_PACKAGES_INSTALL_DIR ${LIB_INSTALL_DIR}/krita-python-libs) | ||
24 | file(GLOB PYKRITA_KRITA_sip_files ./krita/*.sip) | 20 | file(GLOB PYKRITA_KRITA_sip_files ./krita/*.sip) | ||
25 | set(SIP_EXTRA_FILES_DEPEND ${PYKRITA_KRITA_sip_files}) | 21 | set(SIP_EXTRA_FILES_DEPEND ${PYKRITA_KRITA_sip_files}) | ||
26 | add_sip_python_module(PyKrita.krita ./krita/kritamod.sip kritalibkis kritaui kritaimage kritalibbrush) | 22 | add_sip_python_module(PyKrita.krita ./krita/kritamod.sip kritalibkis kritaui kritaimage kritalibbrush) | ||
27 | 23 | | |||
28 | if (ENABLE_PYTHON_2) | 24 | if (ENABLE_PYTHON_2) | ||
29 | # Add an init file to turn it into a valid py2 module. | 25 | # Add an init file to turn it into a valid py2 module. | ||
30 | # Otherwise PyKrita cannot be loaded. | 26 | # Otherwise PyKrita cannot be loaded. | ||
31 | install(FILES | 27 | install(FILES | ||
32 | ./__init__.py | 28 | ./__init__.py | ||
33 | DESTINATION ${PYTHON_SITE_PACKAGES_INSTALL_DIR}/PyKrita) | 29 | DESTINATION ${PYTHON_SITE_PACKAGES_INSTALL_DIR}/PyKrita) | ||
34 | endif (ENABLE_PYTHON_2) | 30 | endif (ENABLE_PYTHON_2) |