Skip to content

Commit 032dbaf

Browse files
author
telwertowski
committedJun 6, 2008
Use cmake script with CONFIGURE_FILE rather than grep/sed to create Mac Info.plist. This circumvents command-line quoting problems when upgrading to CMake 2.6.
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8600 c8812cc2-4d05-0410-92ff-de0c093fc19c

File tree

3 files changed

+26
-18
lines changed

3 files changed

+26
-18
lines changed
 

‎src/mac/Contents/CMakeLists.txt

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,11 @@
33
# create Info.plist
44

55
ADD_CUSTOM_TARGET(Info.plist ALL
6-
VERSION=`grep VERSION ${CMAKE_BINARY_DIR}/qgsconfig.h | head -1 |
7-
sed -e "s/#define VERSION //"
8-
-e "s/\\\"//g"` &&
9-
SVNVERSION=`grep QGSSVNVERSION ${CMAKE_BINARY_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_BINARY_DIR}/qgsconfig.h)
18-
19-
ADD_DEPENDENCIES(Info.plist svnversion)
6+
DEPENDS ${SVN_MARKER}
7+
COMMAND ${CMAKE_COMMAND}
8+
-D CURRENT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}
9+
-D VERSION=${COMPLETE_VERSION}-${RELEASE_NAME}
10+
-P ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.cmake)
2011

2112
#############################################################
2213
# process subdirs

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
SET(CMAKE_BACKWARDS_COMPATIBILITY "2.4")
2+
3+
# See if we have svn installed
4+
FIND_PROGRAM(SVNVERSION svnversion)
5+
6+
# Read the revision if installed, else set to "unknown"
7+
IF (SVNVERSION)
8+
EXEC_PROGRAM (${SVNVERSION} ARGS ${CURRENT_SOURCE_DIR} OUTPUT_VARIABLE REVISION)
9+
ELSE (SVNVERSION)
10+
SET (REVISION unknown)
11+
ENDIF (SVNVERSION)
12+
13+
# Create Info.plist
14+
CONFIGURE_FILE (${CURRENT_SOURCE_DIR}/Info.plist.in
15+
${CMAKE_CURRENT_BINARY_DIR}/Info.plist)

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

Lines changed: 6 additions & 4 deletions
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-2008 QGIS Development Team</string>
14+
<string>QGIS @VERSION@ (@REVISION@), © 2002-2008 QGIS Development Team</string>
1515
<key>CFBundleShortVersionString</key>
16-
<string>@SHORTVERSION (@SVNVERSION)</string>
16+
<string>@VERSION@ (@REVISION@)</string>
1717
<key>CFBundleVersion</key>
18-
<string>@VERSION</string>
18+
<string>@VERSION@ (@REVISION@)</string>
1919
<key>CFBundleIconFile</key>
2020
<string>qgis.icns</string>
2121
<key>CFBundleDocumentTypes</key>
@@ -176,15 +176,17 @@
176176
</array>
177177
<key>CFBundleLocalizations</key>
178178
<array>
179-
<string>ar</string>
180179
<string>en</string>
180+
<string>ar</string>
181181
<string>cs_CZ</string>
182182
<string>de</string>
183183
<string>es</string>
184184
<string>fr</string>
185+
<string>hu</string>
185186
<string>id</string>
186187
<string>it</string>
187188
<string>ja</string>
189+
<string>lo</string>
188190
<string>lt</string>
189191
<string>lv</string>
190192
<string>mn</string>

0 commit comments

Comments
 (0)
Please sign in to comment.