Skip to content

Commit db4a94a

Browse files
author
telwertowski
committedJan 16, 2007
Fix dependencies for building Mac Info.plist
git-svn-id: http://svn.osgeo.org/qgis/trunk@6440 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 4bda397 commit db4a94a

File tree

3 files changed

+20
-17
lines changed

3 files changed

+20
-17
lines changed
 

‎src/mac/Contents/CMakeLists.txt

+16-14
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,21 @@
22
#############################################################
33
# create Info.plist
44

5-
EXECUTE_PROCESS(COMMAND grep VERSION ${CMAKE_SOURCE_DIR}/qgsconfig.h
6-
OUTPUT_VARIABLE VERSION
7-
OUTPUT_STRIP_TRAILING_WHITESPACE)
8-
STRING(REGEX REPLACE "#define VERSION \"(.*)\"" "\\1" VERSION ${VERSION})
9-
10-
EXECUTE_PROCESS(COMMAND grep SVNVERSION ${CMAKE_SOURCE_DIR}/qgssvnversion.h
11-
OUTPUT_VARIABLE SVNVERSION
12-
OUTPUT_STRIP_TRAILING_WHITESPACE)
13-
STRING(REGEX REPLACE "#define QGSSVNVERSION \"(.*)\"" "\\1" SVNVERSION ${SVNVERSION})
14-
15-
SET(SHORTVERSION ${VERSION})
16-
17-
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in
18-
${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
5+
ADD_CUSTOM_TARGET(Info.plist ALL
6+
VERSION=`grep VERSION ${CMAKE_SOURCE_DIR}/qgsconfig.h |
7+
sed -e "s/#define VERSION //"
8+
-e "s/\\\"//g"` &&
9+
SVNVERSION=`grep QGSSVNVERSION ${CMAKE_SOURCE_DIR}/qgssvnversion.h |
10+
sed -e "s/#define QGSSVNVERSION //"
11+
-e "s/\\\"//g"` &&
12+
sed -e "s/@VERSION/$$VERSION/"
13+
-e "s/@SHORTVERSION/$$VERSION/"
14+
-e "s/@SVNVERSION/$$SVNVERSION/"
15+
< ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in > Info.plist
16+
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in
17+
${CMAKE_SOURCE_DIR}/qgsconfig.h)
18+
19+
ADD_DEPENDENCIES(Info.plist svnversion)
1920

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

2829
INSTALL (FILES ${CMAKE_CURRENT_BINARY_DIR}/Info.plist
30+
${CMAKE_CURRENT_SOURCE_DIR}/PkgInfo
2931
DESTINATION ${CMAKE_INSTALL_PREFIX}/..)
3032

3133
# Update bundle modification date so Finder scans latest plist

‎src/mac/Contents/Info.plist.in

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
<key>CFBundleSignature</key>
1212
<string>QGIS</string>
1313
<key>CFBundleGetInfoString</key>
14-
<string>QGIS ${VERSION} (${SVNVERSION}), © 2002-2007 QGIS Development Team</string>
14+
<string>QGIS @VERSION (@SVNVERSION), © 2002-2007 QGIS Development Team</string>
1515
<key>CFBundleShortVersionString</key>
16-
<string>${SHORTVERSION} (${SVNVERSION})</string>
16+
<string>@SHORTVERSION (@SVNVERSION)</string>
1717
<key>CFBundleVersion</key>
18-
<string>${VERSION}</string>
18+
<string>@VERSION</string>
1919
<key>CFBundleIconFile</key>
2020
<string>qgis.icns</string>
2121
<key>CFBundleDocumentTypes</key>

‎src/mac/Contents/PkgInfo

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
APPLQGIS

0 commit comments

Comments
 (0)
Please sign in to comment.