Skip to content

Commit

Permalink
clean up qscintilla bundling
Browse files Browse the repository at this point in the history
  • Loading branch information
kyngchaos committed Apr 2, 2013
1 parent 2b0d3e7 commit c367925
Showing 1 changed file with 10 additions and 27 deletions.
37 changes: 10 additions & 27 deletions mac/cmake/1qt.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -124,30 +124,11 @@ ENDIF (ISLIB)

# QScintilla2

IF (@QSCINTILLA_FOUND@)
STRING (REGEX MATCH "\\.dylib$" QSCILIB "@QSCINTILLA_LIBRARY@")
IF (QSCILIB)
# shared library
MESSAGE (STATUS "Copying QScintilla2 and updating library paths...")
IF (NOT EXISTS "${QLIBDIR}/libqscintilla2.dylib")
# ditto should copy most current dylib from any symlink
EXECUTE_PROCESS (COMMAND ditto ${QARCHS} "@QSCINTILLA_LIBRARY@" "${QLIBDIR}/")
STRING(REGEX REPLACE "/libqscintilla2.*" "" QSCI_PARENT "@QSCINTILLA_LIBRARY@")
FILE (GLOB QSCI_LIST "${QSCI_PARENT}/libqscintilla2*")
FOREACH (QSCI_DYLIB ${QSCI_LIST})
IF (IS_SYMLINK "${QSCI_DYLIB}")
# for symlinks, which are ignored by ditto
EXECUTE_PROCESS (COMMAND cp -a "${QSCI_DYLIB}" "${QLIBDIR}/")
ENDIF ()
ENDFOREACH (QSCI_DYLIB)
ENDIF ()
GET_INSTALL_NAME ("@QSCINTILLA_LIBRARY@" "libqscintilla2" QSCI_CHG)
IF (QSCI_CHG)
STRING(REGEX REPLACE ".*(libqscintilla2.*\\.dylib)$" "\\1" QSCI_CHG_NAME "${QSCI_CHG}")
UPDATEQGISPATHS (${QSCI_CHG} ${QSCI_CHG_NAME})
ENDIF (QSCI_CHG)
ENDIF (QSCILIB)
ENDIF (@QSCINTILLA_FOUND@)
IF (@QSCINTILLA_LIBRARY@ MATCHES ".*libqscintilla2.dylib")
MESSAGE (STATUS "Copying QScintilla2 library...")
EXECUTE_PROCESS (COMMAND ditto ${QARCHS} "@QSCINTILLA_LIBRARY@" "${QLIBDIR}/libqscintilla2.dylib")
# nothing to update in QGIS
ENDIF ()

# PyQt

Expand Down Expand Up @@ -238,12 +219,14 @@ ENDIF ()

IF (EXISTS "${QGISPYDIR}/PyQt${QT_FWVER}/Qsci.so")
MESSAGE (STATUS "Updating QScintilla2 Python module library paths...")
IF (QSCI_CHG AND QSCI_CHG_NAME)
GET_INSTALL_NAME ("${QGISPYDIR}/PyQt${QT_FWVER}/Qsci.so" "libqscintilla2" QSCI_CHG)
IF (QSCI_CHG)
SET (QSCI_CHG_TO "${ATEXECUTABLE}/@QGIS_LIB_SUBDIR@/libqscintilla2.dylib")
IF (@OSX_HAVE_LOADERPATH@)
SET (QSCI_CHG_TO "${ATLOADER}/../../@QGIS_DATA_SUBDIR_REV@/@QGIS_LIB_SUBDIR@/${QSCI_CHG_NAME}")
SET (QSCI_CHG_TO "${ATLOADER}/../../@QGIS_DATA_SUBDIR_REV@/@QGIS_LIB_SUBDIR@/libqscintilla2.dylib")
ENDIF (@OSX_HAVE_LOADERPATH@)
INSTALLNAMETOOL_CHANGE ("${QSCI_CHG}" "${QSCI_CHG_TO}" "${QGISPYDIR}/PyQt${QT_FWVER}/Qsci.so")
ENDIF (QSCI_CHG AND QSCI_CHG_NAME)
ENDIF (QSCI_CHG)
ENDIF ()

# don't load plugins from system-installed Qt
Expand Down

0 comments on commit c367925

Please sign in to comment.