Skip to content

Commit

Permalink
some mac cmake cleanup, update mac folder notes
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14475 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
kyngchaos committed Nov 1, 2010
1 parent a028d5a commit b043a5f
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 13 deletions.
5 changes: 1 addition & 4 deletions mac/cmake/1qt.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ CMAKE_POLICY (SET CMP0012 NEW)

SET (QAPPDIRC "@QGIS_MACAPP_PREFIX@")
SET (QAPPDIR "@CMAKE_INSTALL_PREFIX@")
#SET (QAPPDIRC "@CMAKE_INSTALL_PREFIX@/@QGIS_APP_NAME@.app/Contents")
#SET (QAPPDIR "${QAPPDIRC}/MacOS")
SET (QFWDIR "${QAPPDIR}/@QGIS_FW_SUBDIR@")
SET (QBINDIR "${QAPPDIR}/@QGIS_BIN_SUBDIR@")
SET (QCGIDIR "${QAPPDIR}/@QGIS_CGIBIN_SUBDIR@")
Expand Down Expand Up @@ -47,7 +45,7 @@ FUNCTION (MYMESSAGE MSG)
ENDIF (@CMAKE_VERBOSE_MAKEFILE@)
ENDFUNCTION (MYMESSAGE)

# isntall_name_tool -change CHANGE CHANGETO CHANGEBIN
# 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}")
Expand Down Expand Up @@ -105,7 +103,6 @@ IF (NOT @OSX_HAVE_LOADERPATH@)
IF (IS_DIRECTORY "${QLIBXIR}/grass/bin")
EXECUTE_PROCESS (COMMAND ln -sfh ../@QGIS_LIBEXEC_SUBDIR_REV@/@QGIS_FW_SUBDIR@ "${QLIBXDIR}/grass/Frameworks")
ENDIF ()
EXECUTE_PROCESS (COMMAND ln -sfh ../../../@QGIS_FW_SUBDIR@ "${QBINDIR}/qgis_help.app/Contents/Frameworks")
EXECUTE_PROCESS (COMMAND ln -sfh @QGIS_CGIBIN_SUBDIR_REV@/@QGIS_LIB_SUBDIR@ "${QCGIDIR}/lib")
ENDIF (NOT @OSX_HAVE_LOADERPATH@)

Expand Down
4 changes: 1 addition & 3 deletions mac/cmake/2lib.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ CMAKE_POLICY (SET CMP0012 NEW)

SET (QAPPDIRC "@QGIS_MACAPP_PREFIX@")
SET (QAPPDIR "@CMAKE_INSTALL_PREFIX@")
#SET (QAPPDIRC "@CMAKE_INSTALL_PREFIX@/@QGIS_APP_NAME@.app/Contents")
#SET (QAPPDIR "${QAPPDIRC}/MacOS")
SET (QFWDIR "${QAPPDIR}/@QGIS_FW_SUBDIR@")
SET (QBINDIR "${QAPPDIR}/@QGIS_BIN_SUBDIR@")
SET (QCGIDIR "${QAPPDIR}/@QGIS_CGIBIN_SUBDIR@")
Expand Down Expand Up @@ -51,7 +49,7 @@ FUNCTION (MYMESSAGE MSG)
ENDIF (@CMAKE_VERBOSE_MAKEFILE@)
ENDFUNCTION (MYMESSAGE)

# isntall_name_tool -change CHANGE CHANGETO CHANGEBIN
# 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}")
Expand Down
2 changes: 0 additions & 2 deletions mac/cmake/3fw.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ CMAKE_POLICY (SET CMP0012 NEW)

SET (QAPPDIRC "@QGIS_MACAPP_PREFIX@")
SET (QAPPDIR "@CMAKE_INSTALL_PREFIX@")
#SET (QAPPDIRC "@CMAKE_INSTALL_PREFIX@/@QGIS_APP_NAME@.app/Contents")
#SET (QAPPDIR "${QAPPDIRC}/MacOS")
SET (QFWDIR "${QAPPDIR}/@QGIS_FW_SUBDIR@")
SET (QBINDIR "${QAPPDIR}/@QGIS_BIN_SUBDIR@")
SET (QCGIDIR "${QAPPDIR}/@QGIS_CGIBIN_SUBDIR@")
Expand Down
25 changes: 21 additions & 4 deletions mac/readme.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
Mac Notes

The 'extras' folder scripts are mainly for a cmake build. All the bundling
scripts' functionality is included in the Xcode project. The readme could be
used in packaging the Xcode build, with necessary adjustments to what's
bundled and what's required externally.
The 'cmake' folder scripts handle bundling dependent libraries in the QGIS
application package and fixing up the library paths. It is automatic during
installation. There are 2 levels currently, specified with the cmake config
option QGIS_MACAPP_BUNDLE, and one that always occurs:

0 = (default) fixup the library paths for all QGIS libraries if @loader_path
is available in the system (OS X 10.5+)
1 = bundle Qt, PyQt and PyQwt
2 = additionally, bundle libraries, but not frameworks

A third level that is not finished will additionally bundle frameworks.
This would create the "standalone" QGIS.


The 'extras' folder scripts are for packaging the old v1.0 build. All the
bundling is now handled in the cmake install, so these scripts are
essentially deprecated.


The Xcode project is now deprecated since the bundling now happens in the
cmake build, including making sure library paths are all correct.
1 change: 1 addition & 0 deletions src/helpviewer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ IF (APPLE)
INSTALL (TARGETS qgis_help BUNDLE DESTINATION ${QGIS_BIN_DIR})
# needed because global install_name prefix is for main qgis app
INSTALL (CODE "EXECUTE_PROCESS(COMMAND install_name_tool -change ${CMAKE_INSTALL_NAME_DIR}/libqgis_core.${COMPLETE_VERSION}.dylib @executable_path/../../../../lib/libqgis_core.${COMPLETE_VERSION}.dylib \"${CMAKE_INSTALL_PREFIX}/${QGIS_BIN_DIR}/qgis_help.app/Contents/MacOS/qgis_help\")")
INSTALL (CODE "EXECUTE_PROCESS (COMMAND ln -sfh ../../../${QGIS_FW_SUBDIR} \"${CMAKE_INSTALL_PREFIX}/${QGIS_BIN_DIR}/qgis_help.app/Contents/Frameworks\"")
ELSE (APPLE)
INSTALL (TARGETS qgis_help RUNTIME DESTINATION ${QGIS_BIN_DIR})
ENDIF (APPLE)

0 comments on commit b043a5f

Please sign in to comment.