iOS build: create ssrf-version.h by hand

It grabs the mobile version from the cmake file via grep.
🤦

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-03-06 10:57:25 -08:00
parent 7fac2a38b2
commit 99d1d8876e

View file

@ -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