Skip to content
Permalink
Browse files
Add available sql drivers to Mac bundled app
  • Loading branch information
dakcarto committed Feb 19, 2013
1 parent 314c783 commit 2a2465ee742a267909de45f4137fcd9d92b6f601
Showing with 21 additions and 3 deletions.
  1. +1 −0 mac/cmake/0vars.cmake.in
  2. +20 −3 mac/cmake/1qt.cmake.in
@@ -40,6 +40,7 @@ SET (WITH_GLOBE "@WITH_GLOBE@")
SET (WITH_GRASS "@WITH_GRASS@")
SET (WITH_MAPSERVER "@WITH_MAPSERVER@")
SET (WITH_POSTGRESQL "@WITH_POSTGRESQL@")
SET (WITH_QSPATIALITE "@WITH_QSPATIALITE@")

# tests
SET (ENABLE_TESTS "@ENABLE_TESTS@")
@@ -77,9 +77,19 @@ FOREACH (QTC cn;jp;kr;tw)
ENDIF ()
ENDFOREACH (QTC)
EXECUTE_PROCESS (COMMAND mkdir -p "${QPLUGDIR}/../sqldrivers")
IF (NOT EXISTS "${QPLUGDIR}/../sqldrivers/libqsqlite.dylib")
EXECUTE_PROCESS (COMMAND ditto ${QARCHS} "@QT_PLUGINS_DIR@/sqldrivers/libqsqlite.dylib" "${QPLUGDIR}/../sqldrivers/libqsqlite.dylib")
SET (QTLISTSQL ite odbc psql mysql)
# qspatialite driver plugin is part of QGIS build
IF (@WITH_QSPATIALITE@)
LIST(APPEND QTLISTSQL spatialite)
IF (EXISTS "${QPLUGDIR}/../sqldrivers/libqsqlspatialite.dylib")
EXECUTE_PROCESS (COMMAND ${CMAKE_COMMAND} -E remove "${QPLUGDIR}/../sqldrivers/libqsqlspatialite.dylib")
ENDIF ()
ENDIF ()
FOREACH (QSL ${QTLISTSQL})
IF (NOT EXISTS "${QPLUGDIR}/../sqldrivers/libqsql${QSL}.dylib" AND EXISTS "@QT_PLUGINS_DIR@/sqldrivers/libqsql${QSL}.dylib")
EXECUTE_PROCESS (COMMAND ditto ${QARCHS} "@QT_PLUGINS_DIR@/sqldrivers/libqsql${QSL}.dylib" "${QPLUGDIR}/../sqldrivers/libqsql${QSL}.dylib")
ENDIF ()
ENDFOREACH (QSL)
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")
@@ -284,7 +294,14 @@ FOREACH (QFW ${QTLISTQG})
FOREACH (QC cn;jp;kr;tw)
INSTALLNAMETOOL_CHANGE ("${QFW_CHG}" "${QFW_CHG_TO}" "${QPLUGDIR}/../codecs/libq${QC}codecs.dylib")
ENDFOREACH (QC)
INSTALLNAMETOOL_CHANGE ("${QFW_CHG}" "${QFW_CHG_TO}" "${QPLUGDIR}/../sqldrivers/libqsqlite.dylib")
FOREACH (QSL ${QTLISTSQL})
IF (EXISTS "${QPLUGDIR}/../sqldrivers/libqsql${QSL}.dylib")
INSTALLNAMETOOL_CHANGE ("${QFW_CHG}" "${QFW_CHG_TO}" "${QPLUGDIR}/../sqldrivers/libqsql${QSL}.dylib")
ENDIF ()
ENDFOREACH (QSL)
IF (@WITH_QSPATIALITE@ AND EXISTS "${QPLUGDIR}/../sqldrivers/libqsqlspatialite.dylib")
EXECUTE_PROCESS (COMMAND install_name_tool -id "libqsqlspatialite.dylib" "${QPLUGDIR}/../sqldrivers/libqsqlspatialite.dylib")
ENDIF ()
INSTALLNAMETOOL_CHANGE ("${QFW_CHG}" "${QFW_CHG_TO}" "${QPLUGDIR}/../iconengines/libqsvgicon.dylib")
# qt fw
IF (@OSX_HAVE_LOADERPATH@)

0 comments on commit 2a2465e

Please sign in to comment.