Skip to content

Commit

Permalink
Fix dependencies for building Mac Info.plist
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@6440 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
telwertowski committed Jan 16, 2007
1 parent 4bda397 commit db4a94a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
30 changes: 16 additions & 14 deletions src/mac/Contents/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/mac/Contents/Info.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions src/mac/Contents/PkgInfo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
APPLQGIS

0 comments on commit db4a94a

Please sign in to comment.