aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-03-06 10:57:25 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-03-06 11:03:11 -0800
commit99d1d8876eb4cd524eab9470d891be746b809f29 (patch)
tree356b0965d6dd6fa6770d710158016337f510571c
parent7fac2a38b2c5a744e1292b37dc0e1e71d3fcf333 (diff)
downloadsubsurface-99d1d8876eb4.tar.gz
iOS build: create ssrf-version.h by hand
It grabs the mobile version from the cmake file via grep. :facepalm: Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--packaging/ios/build.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/packaging/ios/build.sh b/packaging/ios/build.sh
index 4636c4cec..a3eac3c58 100644
--- a/packaging/ios/build.sh
+++ b/packaging/ios/build.sh
@@ -9,6 +9,18 @@ IOS_QT=${TOP}/Qt
# Build Subsurface-mobile by default
SUBSURFACE_MOBILE=1
+# set up the versions by hand
+GITVERSION=$(git describe --tags --abbrev=12)
+CANONICALVERSION=$(git describe --tags --abbrev=12 | sed -e 's/-g.*$// ; s/^v//' | sed -e 's/-/./')
+MOBILEVERSION=$(grep MOBILE ../../cmake/Modules/version.cmake | cut -d\" -f 2)
+
+echo $GITVERSION
+echo $CANONICALVERSION
+echo $MOBILEVERSION
+echo "#define GIT_VERSION_STRING \"$GITVERSION\"" > subsurface-ios/ssrf-version.h
+echo "#define CANONICAL_VERSION_STRING \"$CANONICALVERSION\"" >> subsurface-ios/ssrf-version.h
+echo "#define MOBILE_VERSION_STRING \"$MOBILEVERSION\"" >> subsurface-ios/ssrf-version.h
+
mkdir -p $TOP/install-root/lib $TOP/install-root/bin $TOP/install-root/include
PKG_CONFIG_LIBDIR=$TOP/install-root/lib/pkgconfig