Skip to content
Permalink
Browse files
Don't bundle PyQwt if not present in system
  • Loading branch information
kyngchaos committed Apr 7, 2012
1 parent b7e2387 commit 48be08be33c49ecc4d31f48b9f3aa2e281b52786
Showing with 25 additions and 20 deletions.
  1. +25 −20 mac/cmake/1qt.cmake.in
@@ -122,27 +122,30 @@ IF (NOT EXISTS "${QBINDIR}/pyuic4")
ENDIF ()

# PyQwt
# only if it's available, not compatible with newer PyQt

MESSAGE (STATUS "Copying PyQwt and updating library paths...")
EXECUTE_PROCESS (COMMAND mkdir -p "${QGISPYDIR}/PyQt${QT_FWVER}/Qwt5")
IF (NOT EXISTS "${QGISPYDIR}/PyQt${QT_FWVER}/Qwt5/_iqt.so")
EXECUTE_PROCESS (COMMAND ditto ${QARCHS} "@SIP_MOD_DIR@/PyQt${QT_FWVER}/Qwt5/_iqt.so" "${QGISPYDIR}/PyQt${QT_FWVER}/Qwt5/")
ENDIF ()
IF (NOT EXISTS "${QGISPYDIR}/PyQt${QT_FWVER}/Qwt5/Qwt.so")
EXECUTE_PROCESS (COMMAND ditto ${QARCHS} "@SIP_MOD_DIR@/PyQt${QT_FWVER}/Qwt5/Qwt.so" "${QGISPYDIR}/PyQt${QT_FWVER}/Qwt5/")
IF (EXISTS "@SIP_MOD_DIR@/PyQt${QT_FWVER}/Qwt5/_iqt.so")
MESSAGE (STATUS "Copying PyQwt and updating library paths...")
EXECUTE_PROCESS (COMMAND mkdir -p "${QGISPYDIR}/PyQt${QT_FWVER}/Qwt5")
IF (NOT EXISTS "${QGISPYDIR}/PyQt${QT_FWVER}/Qwt5/_iqt.so")
EXECUTE_PROCESS (COMMAND ditto ${QARCHS} "@SIP_MOD_DIR@/PyQt${QT_FWVER}/Qwt5/_iqt.so" "${QGISPYDIR}/PyQt${QT_FWVER}/Qwt5/")
ENDIF ()
IF (NOT EXISTS "${QGISPYDIR}/PyQt${QT_FWVER}/Qwt5/Qwt.so")
EXECUTE_PROCESS (COMMAND ditto ${QARCHS} "@SIP_MOD_DIR@/PyQt${QT_FWVER}/Qwt5/Qwt.so" "${QGISPYDIR}/PyQt${QT_FWVER}/Qwt5/")
ENDIF ()
FILE (GLOB PQWPYLIST "@SIP_MOD_DIR@/PyQt${QT_FWVER}/Qwt5/*.py")
FOREACH (PQWPY ${PQWPYLIST})
EXECUTE_PROCESS (COMMAND cp -fp "${PQWPY}" "${QGISPYDIR}/PyQt${QT_FWVER}/Qwt5/")
ENDFOREACH (PQWPY)
IF (QWT_CHG)
IF (@OSX_HAVE_LOADERPATH@)
SET (QWT_CHG_TO "${ATLOADER}/../../../@QGIS_DATA_SUBDIR_REV@/@QGIS_LIB_SUBDIR@/libqwt.dylib")
ENDIF (@OSX_HAVE_LOADERPATH@)
FOREACH (PW _iqt;Qwt)
INSTALLNAMETOOL_CHANGE ("${QWT_CHG}" "${QWT_CHG_TO}" "${QGISPYDIR}/PyQt${QT_FWVER}/Qwt5/${PW}.so")
ENDFOREACH (PW)
ENDIF (QWT_CHG)
ENDIF ()
FILE (GLOB PQWPYLIST "@SIP_MOD_DIR@/PyQt${QT_FWVER}/Qwt5/*.py")
FOREACH (PQWPY ${PQWPYLIST})
EXECUTE_PROCESS (COMMAND cp -fp "${PQWPY}" "${QGISPYDIR}/PyQt${QT_FWVER}/Qwt5/")
ENDFOREACH (PQWPY)
IF (QWT_CHG)
IF (@OSX_HAVE_LOADERPATH@)
SET (QWT_CHG_TO "${ATLOADER}/../../../@QGIS_DATA_SUBDIR_REV@/@QGIS_LIB_SUBDIR@/libqwt.dylib")
ENDIF (@OSX_HAVE_LOADERPATH@)
FOREACH (PW _iqt;Qwt)
INSTALLNAMETOOL_CHANGE ("${QWT_CHG}" "${QWT_CHG_TO}" "${QGISPYDIR}/PyQt${QT_FWVER}/Qwt5/${PW}.so")
ENDFOREACH (PW)
ENDIF (QWT_CHG)

# don't load plugins from system-installed Qt
FILE (WRITE "${QAPPDIRC}/Resources/qt.conf" "")
@@ -196,7 +199,9 @@ FOREACH (QFW ${QTLISTQG})
SET (QFW_CHG_TO "${ATLOADER}/../../../@QGIS_DATA_SUBDIR_REV@/${QGIS_FW_SUBDIR}/${LIBPOST}")
ENDIF ()
FOREACH (PW _iqt;Qwt)
INSTALLNAMETOOL_CHANGE ("${QFW_CHG}" "${QFW_CHG_TO}" "${QGISPYDIR}/PyQt${QT_FWVER}/Qwt5/${PW}.so")
IF (EXISTS "${QGISPYDIR}/PyQt${QT_FWVER}/Qwt5/${PW}.so")
INSTALLNAMETOOL_CHANGE ("${QFW_CHG}" "${QFW_CHG_TO}" "${QGISPYDIR}/PyQt${QT_FWVER}/Qwt5/${PW}.so")
ENDIF ()
ENDFOREACH (PW)
# bin - PyQt utils
SET (QFW_CHG_TO "${ATEXECUTABLE}/@QGIS_BIN_SUBDIR_REV@/${QGIS_FW_SUBDIR}/${LIBPOST}")

0 comments on commit 48be08b

Please sign in to comment.