aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/ios/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/ios/build.sh')
-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