Skip to content
Permalink
Browse files

Add QwtPolar bundling for Mac

  • Loading branch information
dakcarto committed Oct 1, 2015
1 parent 5e3136d commit 2e011bcf4f58d8cd6347c6e483bc1c7fcae5527b
Showing with 69 additions and 7 deletions.
  1. +69 −7 mac/cmake/1qt.cmake.in
@@ -87,9 +87,9 @@ ENDIF ()

# Qwt

STRING (REGEX MATCH "\\.dylib$" ISLIB "@QWT_LIBRARY@")
STRING (REGEX MATCH "qwt.framework" ISFW "@QWT_LIBRARY@")
IF (ISLIB)
STRING (REGEX MATCH "\\.dylib$" QWT_ISLIB "@QWT_LIBRARY@")
STRING (REGEX MATCH "qwt.framework" QWT_ISFW "@QWT_LIBRARY@")
IF (QWT_ISLIB)
# shared libraries
MESSAGE (STATUS "Copying Qwt and updating library paths...")
IF (NOT EXISTS "${QLIBDIR}/libqwt.dylib")
@@ -99,18 +99,66 @@ IF (ISLIB)
IF (QWT_CHG)
UPDATEQGISPATHS (${QWT_CHG} libqwt.dylib)
ENDIF (QWT_CHG)
ELSEIF (ISFW AND EXISTS "@QWT_LIBRARY@")
ELSEIF (QWT_ISFW AND EXISTS "@QWT_LIBRARY@")
# framework
MESSAGE (STATUS "Copying Qwt framework and updating library paths...")
STRING(REGEX REPLACE "/qwt.framework.*" "" QWT_PARENT "@QWT_LIBRARY@")
IF (NOT IS_DIRECTORY "${QFWDIR}/qwt.framework")
STRING(REGEX REPLACE "/qwt.framework.*" "" QWT_PARENT "@QWT_LIBRARY@")
COPY_FRAMEWORK("${QWT_PARENT}" "qwt" "${QFWDIR}")
ENDIF ()
GET_INSTALL_NAME ("@QWT_LIBRARY@" "qwt" QWT_CHG)
GET_INSTALL_NAME ("${QWT_PARENT}/qwt.framework/qwt" "qwt.framework" QWT_CHG)
IF (QWT_CHG)
UPDATEQGISPATHS (${QWT_CHG} qwt)
ENDIF (QWT_CHG)
ENDIF (ISLIB)
ENDIF (QWT_ISLIB)


# QwtPolar

IF (@WITH_QWTPOLAR@ AND NOT @WITH_INTERNAL_QWTPOLAR@)
STRING (REGEX MATCH "\\.dylib$" ISLIB "@QWTPOLAR_LIBRARY@")
STRING (REGEX MATCH "qwtpolar.framework" ISFW "@QWTPOLAR_LIBRARY@")
IF (ISLIB)
# shared libraries
MESSAGE (STATUS "Copying QwtPolar and updating library paths...")
IF (NOT EXISTS "${QLIBDIR}/libqwtpolar.dylib")
EXECUTE_PROCESS (COMMAND ditto ${QARCHS} "@QWT_LIBRARY@" "${QLIBDIR}/libqwtpolar.dylib")
ENDIF ()
GET_INSTALL_NAME ("@QWTPOLAR_LIBRARY@" "libqwtpolar" QWTP_CHG)
IF (QWTP_CHG)
UPDATEQGISPATHS (${QWTP_CHG} libqwtpolar.dylib)
ENDIF (QWTP_CHG)
# update qwt lib in qwtpolar
IF (QWT_CHG)
IF (QWT_ISLIB)
SET (QWT_CHG_TO "${ATLOADER}/libqwt.dylib")
ElSE ()
SET (QWT_CHG_TO "${ATLOADER}/${QGIS_LIB_SUBDIR_REV}/${QGIS_FW_SUBDIR}/qwt.framework/qwt")
ENDIF ()
INSTALLNAMETOOL_CHANGE ("${QWT_CHG}" "${QWT_CHG_TO}" "${QLIBDIR}/libqwtpolar.dylib")
ENDIF (QWT_CHG)
ELSEIF (ISFW AND EXISTS "@QWTPOLAR_LIBRARY@")
# framework
MESSAGE (STATUS "Copying QwtPolar framework and updating library paths...")
STRING(REGEX REPLACE "/qwtpolar.framework.*" "" QWTP_PARENT "@QWTPOLAR_LIBRARY@")
IF (NOT IS_DIRECTORY "${QFWDIR}/qwtpolar.framework")
COPY_FRAMEWORK("${QWTP_PARENT}" "qwtpolar" "${QFWDIR}")
ENDIF ()
GET_INSTALL_NAME ("${QWTP_PARENT}/qwtpolar.framework/qwtpolar" "qwtpolar.framework" QWTP_CHG)
IF (QWTP_CHG)
UPDATEQGISPATHS (${QWTP_CHG} qwtpolar)
ENDIF (QWTP_CHG)
# update qwt lib in qwtpolar
IF (QWT_CHG)
IF (QWT_ISLIB)
SET (QWT_CHG_TO "${ATLOADER}/../../../${QGIS_FW_SUBDIR_REV}/${QGIS_LIB_SUBDIR}/libqwt.dylib")
ElSE ()
SET (QWT_CHG_TO "${ATLOADER}/../../../qwt.framework/qwt")
ENDIF ()
INSTALLNAMETOOL_CHANGE ("${QWT_CHG}" "${QWT_CHG_TO}" "${QFWDIR}/qwtpolar.framework/qwtpolar")
ENDIF (QWT_CHG)
ENDIF (ISLIB)
ENDIF (@WITH_QWTPOLAR@ AND NOT @WITH_INTERNAL_QWTPOLAR@)

# QCA

@@ -300,6 +348,20 @@ FOREACH (QFW ${QTLISTQG})
ENDIF ()
INSTALLNAMETOOL_CHANGE ("${QFW_CHG}" "${QFW_CHG_TO}" "${QFWDIR}/qwt.framework/qwt")
ENDIF (ISLIB)
# QwtPolar
STRING (REGEX MATCH "\\.dylib$" ISLIB "@QWTPOLAR_LIBRARY@")
STRING (REGEX MATCH "qwtpolar.framework" ISFW "@QWTPOLAR_LIBRARY@")
IF (ISLIB)
IF (@OSX_HAVE_LOADERPATH@)
SET (QFW_CHG_TO "${ATLOADER}/${QGIS_LIB_SUBDIR_REV}/${QGIS_FW_SUBDIR}/${LIBPOST}")
ENDIF ()
INSTALLNAMETOOL_CHANGE ("${QFW_CHG}" "${QFW_CHG_TO}" "${QLIBDIR}/libqwtpolar.dylib")
ELSEIF (ISFW AND EXISTS "${QFWDIR}/qwtpolar.framework/qwtpolar")
IF (@OSX_HAVE_LOADERPATH@)
SET (QFW_CHG_TO "${ATLOADER}/../../../${LIBPOST}")
ENDIF ()
INSTALLNAMETOOL_CHANGE ("${QFW_CHG}" "${QFW_CHG_TO}" "${QFWDIR}/qwtpolar.framework/qwtpolar")
ENDIF (ISLIB)
# QCA
STRING (REGEX MATCH "\\.dylib$" ISLIB "@QCA_LIBRARY@")
STRING (REGEX MATCH "qca.framework" ISFW "@QCA_LIBRARY@")

0 comments on commit 2e011bc

Please sign in to comment.
You can’t perform that action at this time.