Skip to content
Permalink
Browse files

better fix for detecting QWTPOLAR without DESKTOP

  • Loading branch information
3nids committed Sep 27, 2018
1 parent 057aafe commit 97c5ed022550774d4f39659633db3d8adb52a130
Showing with 46 additions and 44 deletions.
  1. +46 −44 mac/cmake/1qt.cmake.in
@@ -132,50 +132,52 @@ ENDIF (QWT_ISLIB)

# QwtPolar

IF (WITH_DESKTOP AND @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_DESKTOP AND @WITH_QWTPOLAR@ AND NOT @WITH_INTERNAL_QWTPOLAR@)
IF (@WITH_DESKTOP@)
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@)
ENDIF (@WITH_DESKTOP@)

# QCA

0 comments on commit 97c5ed0

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