Skip to content
Permalink
Browse files

Update bundling of qspatialite and postgres Qt SQL plugins for Mac

  • Loading branch information
dakcarto committed Oct 2, 2015
1 parent 80bb62c commit ed32f49c84faf5affff9914b7d44f7c0e66f3a01
Showing with 22 additions and 0 deletions.
  1. +14 −0 mac/cmake/1qt.cmake.in
  2. +8 −0 mac/cmake/2lib.cmake.in
@@ -76,6 +76,9 @@ FOREACH (QSL ${QTLISTSQL})
EXECUTE_PROCESS (COMMAND ditto ${QARCHS} "@QT_PLUGINS_DIR@/sqldrivers/libqsql${QSL}.dylib" "${QPLUGDIR}/../sqldrivers/libqsql${QSL}.dylib")
ENDIF ()
ENDFOREACH (QSL)
IF (NOT @WITH_QSPATIALITE@ AND EXISTS "${QPLUGDIR}/../sqldrivers/libqsqlspatialite.dylib")
EXECUTE_PROCESS (COMMAND ${CMAKE_COMMAND} -E remove "${QPLUGDIR}/../sqldrivers/libqsqlspatialite.dylib")
ENDIF ()
EXECUTE_PROCESS (COMMAND mkdir -p "${QPLUGDIR}/../iconengines")
IF (NOT EXISTS "${QPLUGDIR}/../iconengines/libqsvgicon.dylib")
EXECUTE_PROCESS (COMMAND ditto ${QARCHS} "@QT_PLUGINS_DIR@/iconengines/libqsvgicon.dylib" "${QPLUGDIR}/../iconengines/libqsvgicon.dylib")
@@ -206,6 +209,17 @@ FOREACH (qca_plugin ${QCA_PLUGINS})
ENDIF ()
ENDFOREACH ()

# QSpatialite Qt plugin
# linked to qca and qgis_core frameworks (see also 2lib.cmake.in)
IF (@WITH_QSPATIALITE@ AND EXISTS "${QPLUGDIR}/../sqldrivers/libqsqlspatialite.dylib")
# qca.framework
INSTALLNAMETOOL_CHANGE ("${QCA_CHG}" "${QCA_CHG_TO}" "${QPLUGDIR}/../sqldrivers/libqsqlspatialite.dylib")
# qgis_core.framework
GET_INSTALL_NAME ("@QGIS_OUTPUT_DIRECTORY@/lib/qgis_core.framework/qgis_core" qgis_core.framework QGCORE)
SET (QGCORE_CHG_TO "${ATLOADER}/@QGIS_PLUGIN_SUBDIR_REV@/${QGIS_FW_SUBDIR}/qgis_core.framework/qgis_core")
INSTALLNAMETOOL_CHANGE ("${QGCORE}" "${QGCORE_CHG_TO}" "${QPLUGDIR}/../sqldrivers/libqsqlspatialite.dylib")
ENDIF ()

# QScintilla2

IF (@QSCINTILLA_LIBRARY@ MATCHES ".*libqscintilla2.dylib")
@@ -30,6 +30,10 @@ IF ("@POSTGRES_LIBRARY@" MATCHES ".*libpq.dylib")
ENDIF (@OSX_HAVE_LOADERPATH@)
INSTALLNAMETOOL_CHANGE ("${INTLLIB}" "${LIB_CHG_TO}" "${QLIBDIR}/libpq.dylib")
ENDIF (INTLLIB)
IF (EXISTS "${QPLUGDIR}/../sqldrivers/libqsqlpsql.dylib")
FILE (RELATIVE_PATH _relpath "${QPLUGDIR}/../sqldrivers" "${QLIBDIR}/libpq.dylib")
INSTALLNAMETOOL_CHANGE ("${PQLIB}" "${ATLOADER}/${_relpath}" "${QPLUGDIR}/../sqldrivers/libqsqlpsql.dylib")
ENDIF ()
ENDIF ()

# libspatialindex
@@ -39,6 +43,10 @@ IF ("@SPATIALINDEX_LIBRARY@" MATCHES ".*libspatialindex.dylib")
EXECUTE_PROCESS (COMMAND ditto ${QARCHS} "@SPATIALINDEX_LIBRARY@" "${QLIBDIR}/libspatialindex.dylib")
GET_INSTALL_NAME ("@SPATIALINDEX_LIBRARY@" "libspatialindex" SPILIB)
UPDATEQGISPATHS (${SPILIB} libspatialindex.dylib)
IF (@WITH_QSPATIALITE@ AND EXISTS "${QPLUGDIR}/../sqldrivers/libqsqlspatialite.dylib")
FILE (RELATIVE_PATH _relpath "${QPLUGDIR}/../sqldrivers" "${QLIBDIR}/libspatialindex.dylib")
INSTALLNAMETOOL_CHANGE ("${SPILIB}" "${ATLOADER}/${_relpath}" "${QPLUGDIR}/../sqldrivers/libqsqlspatialite.dylib")
ENDIF ()
ENDIF ()

# libfcgi (non-system)

0 comments on commit ed32f49

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