For Mac, install everything into an application bundle.

git-svn-id: http://svn.osgeo.org/qgis/trunk@6420 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
telwertowski 2007-01-11 22:16:41 +00:00
parent f6c89dddc6
commit de5c8f730c
9 changed files with 58 additions and 6 deletions

View File

@ -164,6 +164,11 @@ IF (WIN32)
ELSE (WIN32)
IF (APPLE)
# for Mac OS X, everything is put inside an application bundle
SET (CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/qgis.app/Contents/MacOS)
ENDIF (APPLE)
# common for MAC and UNIX
SET (QGIS_BIN_DIR ${CMAKE_INSTALL_PREFIX}/bin)
SET (QGIS_DATA_DIR ${CMAKE_INSTALL_PREFIX}/share/qgis)

View File

@ -1,2 +1,6 @@
SUBDIRS(core ui gui app providers plugins helpviewer)
IF (APPLE)
SUBDIRS(mac)
ENDIF(APPLE)

View File

@ -218,4 +218,9 @@ IF (POSTGRES_FOUND)
TARGET_LINK_LIBRARIES (qgis ${POSTGRES_LIBRARY})
ENDIF (POSTGRES_FOUND)
INSTALL(TARGETS qgis RUNTIME DESTINATION ${QGIS_BIN_DIR})
IF (APPLE)
# For Mac OS X, the executable must be at the root of the bundle's executable folder
INSTALL(TARGETS qgis RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
ELSE (APPLE)
INSTALL(TARGETS qgis RUNTIME DESTINATION ${QGIS_BIN_DIR})
ENDIF (APPLE)

View File

@ -27,7 +27,7 @@ QT4_WRAP_CPP (HELP_MOC_SRCS ${HELP_MOC_HDRS})
#QT4_ADD_RESOURCES(HELP_RCC_SRCS ${HELP_RCCS})
ADD_EXECUTABLE (qgis_help ${HELP_SRCS} ${HELP_MOC_SRCS} ${HELP_UIS_H})
ADD_EXECUTABLE (qgis_help MACOSX_BUNDLE ${HELP_SRCS} ${HELP_MOC_SRCS} ${HELP_UIS_H})
INCLUDE_DIRECTORIES(.
${CMAKE_CURRENT_BINARY_DIR}

2
src/mac/CMakeLists.txt Normal file
View File

@ -0,0 +1,2 @@
SUBDIRS(Contents)

View File

@ -0,0 +1,32 @@
#############################################################
# create Info.plist
EXECUTE_PROCESS(COMMAND grep VERSION ${CMAKE_SOURCE_DIR}/qgsconfig.h
OUTPUT_VARIABLE VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
STRING(REGEX REPLACE "#define VERSION \"(.*)\"" "\\1" VERSION ${VERSION})
EXECUTE_PROCESS(COMMAND grep SVNVERSION ${CMAKE_SOURCE_DIR}/qgssvnversion.h
OUTPUT_VARIABLE SVNVERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
STRING(REGEX REPLACE "#define QGSSVNVERSION \"(.*)\"" "\\1" SVNVERSION ${SVNVERSION})
SET(SHORTVERSION ${VERSION})
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in
${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
#############################################################
# process subdirs
SUBDIRS(Resources)
#############################################################
# install
INSTALL (FILES ${CMAKE_CURRENT_BINARY_DIR}/Info.plist
DESTINATION ${CMAKE_INSTALL_PREFIX}/..)
# Update bundle modification date so Finder scans latest plist
INSTALL (CODE "EXECUTE_PROCESS(COMMAND touch ${CMAKE_INSTALL_PREFIX}/../../.)")

View File

@ -11,11 +11,11 @@
<key>CFBundleSignature</key>
<string>QGIS</string>
<key>CFBundleGetInfoString</key>
<string>QGIS @VERSION (@SVNVERSION), © 2002-2006 QGIS Development Team</string>
<string>QGIS ${VERSION} (${SVNVERSION}), © 2002-2007 QGIS Development Team</string>
<key>CFBundleShortVersionString</key>
<string>@SHORTVERSION (@SVNVERSION)</string>
<string>${SHORTVERSION} (${SVNVERSION})</string>
<key>CFBundleVersion</key>
<string>@VERSION</string>
<string>${VERSION}</string>
<key>CFBundleIconFile</key>
<string>qgis.icns</string>
<key>CFBundleDocumentTypes</key>

View File

@ -0,0 +1,4 @@
FILE (GLOB ICONS *.icns)
INSTALL (FILES ${ICONS}
DESTINATION ${CMAKE_INSTALL_PREFIX}/../Resources)

View File

@ -25,7 +25,7 @@ INCLUDE_DIRECTORIES (
${PYTHON_INCLUDE_PATH}
)
ADD_EXECUTABLE (msexport ${MSEXPORT_SRCS} ${MSEXPORT_MOC_SRCS})
ADD_EXECUTABLE (msexport MACOSX_BUNDLE ${MSEXPORT_SRCS} ${MSEXPORT_MOC_SRCS})
TARGET_LINK_LIBRARIES (msexport
${QT_LIBRARIES}