Skip to content
Permalink
Browse files

Fix dependencies for building Mac Info.plist

git-svn-id: http://svn.osgeo.org/qgis/trunk@6440 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
telwertowski
telwertowski committed Jan 16, 2007
1 parent 4bda397 commit db4a94ab0c889bd5296469f58a63ea096001a447
Showing with 20 additions and 17 deletions.
  1. +16 −14 src/mac/Contents/CMakeLists.txt
  2. +3 −3 src/mac/Contents/Info.plist.in
  3. +1 −0 src/mac/Contents/PkgInfo
@@ -2,20 +2,21 @@
#############################################################
# 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)
ADD_CUSTOM_TARGET(Info.plist ALL
VERSION=`grep VERSION ${CMAKE_SOURCE_DIR}/qgsconfig.h |
sed -e "s/#define VERSION //"
-e "s/\\\"//g"` &&
SVNVERSION=`grep QGSSVNVERSION ${CMAKE_SOURCE_DIR}/qgssvnversion.h |
sed -e "s/#define QGSSVNVERSION //"
-e "s/\\\"//g"` &&
sed -e "s/@VERSION/$$VERSION/"
-e "s/@SHORTVERSION/$$VERSION/"
-e "s/@SVNVERSION/$$SVNVERSION/"
< ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in > Info.plist
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in
${CMAKE_SOURCE_DIR}/qgsconfig.h)

ADD_DEPENDENCIES(Info.plist svnversion)

#############################################################
# process subdirs
@@ -26,6 +27,7 @@ SUBDIRS(Resources)
# install

INSTALL (FILES ${CMAKE_CURRENT_BINARY_DIR}/Info.plist
${CMAKE_CURRENT_SOURCE_DIR}/PkgInfo
DESTINATION ${CMAKE_INSTALL_PREFIX}/..)

# Update bundle modification date so Finder scans latest plist
@@ -11,11 +11,11 @@
<key>CFBundleSignature</key>
<string>QGIS</string>
<key>CFBundleGetInfoString</key>
<string>QGIS ${VERSION} (${SVNVERSION}), © 2002-2007 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>
@@ -0,0 +1 @@
APPLQGIS

0 comments on commit db4a94a

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