[QGIS Commit] r14474 - trunk/qgis/mac/cmake

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Oct 31 22:43:17 EDT 2010


Author: kyngchaos
Date: 2010-10-31 19:43:17 -0700 (Sun, 31 Oct 2010)
New Revision: 14474

Added:
   trunk/qgis/mac/cmake/3fw.cmake.in
Log:
framework bundling placeholder

Added: trunk/qgis/mac/cmake/3fw.cmake.in
===================================================================
--- trunk/qgis/mac/cmake/3fw.cmake.in	                        (rev 0)
+++ trunk/qgis/mac/cmake/3fw.cmake.in	2010-11-01 02:43:17 UTC (rev 14474)
@@ -0,0 +1,117 @@
+# 3fw - bundle standard frameworks
+# ! cmakecache vars not available to external scripts
+#   so we configure it first to do substitutions
+#   make sure to use @varname@
+
+MESSAGE (STATUS "Bundling frameworks is not functional yet, skipping...")
+
+# need part of BundleUtilities
+INCLUDE (GetPrerequisites)
+
+# kill boolean warnings
+CMAKE_POLICY (SET CMP0012 NEW)
+
+SET (QAPPDIRC "@QGIS_MACAPP_PREFIX@")
+SET (QAPPDIR "@CMAKE_INSTALL_PREFIX@")
+#SET (QAPPDIRC "@CMAKE_INSTALL_PREFIX@/@QGIS_APP_NAME at .app/Contents")
+#SET (QAPPDIR "${QAPPDIRC}/MacOS")
+SET (QFWDIR "${QAPPDIR}/@QGIS_FW_SUBDIR@")
+SET (QBINDIR "${QAPPDIR}/@QGIS_BIN_SUBDIR@")
+SET (QCGIDIR "${QAPPDIR}/@QGIS_CGIBIN_SUBDIR@")
+SET (QLIBDIR "${QAPPDIR}/@QGIS_LIB_SUBDIR@")
+SET (QLIBXDIR "${QAPPDIR}/@QGIS_LIBEXEC_SUBDIR@")
+SET (QDATADIR "${QAPPDIR}/@QGIS_DATA_SUBDIR@")
+SET (QPLUGDIR "${QAPPDIR}/@QGIS_PLUGIN_SUBDIR@")
+SET (QGISPYDIR "${QAPPDIR}/@QGIS_DATA_SUBDIR@/python")
+# Qt framework version is major version
+SET (QT_FWVER @QT_VERSION_MAJOR@)
+
+# so config-file doesn't try to replace @
+SET (ATEXECUTABLE "@executable_path")
+SET (ATLOADER "@loader_path")
+
+# helper functions
+
+FUNCTION (GET_INSTALL_NAME LIBFILE LIBNAME OUTVAR)
+    get_prerequisites ("${LIBFILE}" LIBLIST 1 0 "" "")
+    FOREACH (L ${LIBLIST})
+        STRING (REGEX MATCH ".*${LIBNAME}.+" LL ${L})
+        IF (LL)
+            SET (${OUTVAR} ${LL} PARENT_SCOPE)
+        ENDIF (LL)
+    ENDFOREACH ()
+ENDFUNCTION (GET_INSTALL_NAME)
+
+# message only if verbose makefiles (use for install_name_tool echos)
+FUNCTION (MYMESSAGE MSG)
+    IF (@CMAKE_VERBOSE_MAKEFILE@)
+        MESSAGE (STATUS "${MSG}")
+    ENDIF (@CMAKE_VERBOSE_MAKEFILE@)
+ENDFUNCTION (MYMESSAGE)
+
+# install_name_tool -change CHANGE CHANGETO CHANGEBIN
+FUNCTION (INSTALLNAMETOOL_CHANGE CHANGE CHANGETO CHANGEBIN)
+	MYMESSAGE ("install_name_tool -change ${CHANGE} ${CHANGETO} \"${CHANGEBIN}\"")
+	EXECUTE_PROCESS (COMMAND install_name_tool -change ${CHANGE} ${CHANGETO} "${CHANGEBIN}")
+ENDFUNCTION (INSTALLNAMETOOL_CHANGE)
+
+FUNCTION (UPDATEQGISPATHS LIBFROM LIBTO)
+    IF (LIBFROM)
+        SET (LIB_CHG_TO "${ATEXECUTABLE}/@QGIS_LIB_SUBDIR@/${LIBTO}")
+        # app - always @executable_path
+        INSTALLNAMETOOL_CHANGE (${LIBFROM} ${LIB_CHG_TO} "${QAPPDIR}/Qgis")
+        # qgis_help - doesn't link anything else than Qt/Qgis
+        # qgis-mapserver
+        IF (@OSX_HAVE_LOADERPATH@)
+            SET (LIB_CHG_TO "${ATEXECUTABLE}/@QGIS_CGIBIN_SUBDIR_REV@/@QGIS_LIB_SUBDIR@/${LIBTO}")
+        ENDIF (@OSX_HAVE_LOADERPATH@)
+        INSTALLNAMETOOL_CHANGE (${LIBFROM} ${LIB_CHG_TO} "${QCGIDIR}/qgis_mapserv.fcgi")
+        # libs
+        IF (@OSX_HAVE_LOADERPATH@)
+            SET (LIB_CHG_TO "${ATLOADER}/@QGIS_LIB_SUBDIR_REV@/@QGIS_LIB_SUBDIR@/${LIBTO}")
+        ENDIF (@OSX_HAVE_LOADERPATH@)
+        FOREACH (QL ${QGLIBLIST})
+            INSTALLNAMETOOL_CHANGE (${LIBFROM} ${LIB_CHG_TO} "${QL}")
+        ENDFOREACH (QL)
+        # GRASS libexec stuff
+        #IF (EXISTS "${QLIBXDIR}/grass/bin/qgis.g.browser")
+        #   IF (@OSX_HAVE_LOADERPATH@)
+        #       SET (LIB_CHG_TO "${ATLOADER}/../../@QGIS_LIBEXEC_SUBDIR_REV@/@QGIS_LIB_SUBDIR@/${LIBTO}")
+        #   ENDIF (@OSX_HAVE_LOADERPATH@)
+        #   INSTALLNAMETOOL_CHANGE (${LIBFROM} ${LIB_CHG_TO} "${QLIBXDIR}/grass/bin/qgis.g.browser")
+        #ENDIF ()
+        # plugins
+        IF (@OSX_HAVE_LOADERPATH@)
+            SET (LIB_CHG_TO "${ATLOADER}/@QGIS_PLUGIN_SUBDIR_REV@/@QGIS_LIB_SUBDIR@/${LIBTO}")
+        ENDIF (@OSX_HAVE_LOADERPATH@)
+        FOREACH (QP ${QGPLUGLIST})
+            INSTALLNAMETOOL_CHANGE (${LIBFROM} ${LIB_CHG_TO} "${QP}")
+        ENDFOREACH (QP)
+        # qgis python
+        IF (@OSX_HAVE_LOADERPATH@)
+            SET (LIB_CHG_TO "${ATLOADER}/../../@QGIS_DATA_SUBDIR_REV@/@QGIS_LIB_SUBDIR@/${LIBTO}")
+        ENDIF (@OSX_HAVE_LOADERPATH@)
+        FOREACH (PG ${QGPYLIST})
+            INSTALLNAMETOOL_CHANGE (${LIBFROM} ${LIB_CHG_TO} "${PG}")
+        ENDFOREACH (PG)
+        # bin - nothing yet
+        #IF (@OSX_HAVE_LOADERPATH@)
+        #    SET (LIB_CHG_TO "${ATLOADER}/@QGIS_BIN_SUBDIR_REV@/@QGIS_LIB_SUBDIR@/${LIBTO}")
+        #ENDIF (@OSX_HAVE_LOADERPATH@)
+        #FOREACH (PB ...)
+        #    INSTALLNAMETOOL_CHANGE (${LIBFROM} ${LIB_CHG_TO} "${QBINDIR}/${PB}")
+        #ENDFOREACH (PB)
+    ENDIF (LIBFROM)
+ENDFUNCTION (UPDATEQGISPATHS)
+
+# arches
+FOREACH (QARCH @CMAKE_OSX_ARCHITECTURES@)
+    SET (QARCHS ${QARCHS} "--arch" "${QARCH}")
+ENDFOREACH (QARCH)
+
+FILE (GLOB QGLIBLIST ${QLIBDIR}/libqgis*.dylib)
+FILE (GLOB QGPLUGLIST ${QPLUGDIR}/*.so)
+FILE (GLOB QGPYLIST ${QGISPYDIR}/qgis/*.so)
+
+# 
+



More information about the QGIS-commit mailing list