summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-12-11 17:14:34 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-12-17 09:17:54 -0800
commit80b5e7990a5c4d1335e575732e2bdb7796589f72 (patch)
treeaac949cbd7c799751a093e7a3272bede7645e9c8 /packaging
parent320b4a77ef793497bcb43bd42c7958c43814f039 (diff)
downloadsubsurface-80b5e7990a5c4d1335e575732e2bdb7796589f72.tar.gz
build-system/iOS: build Kirigami separately for iOS as well
Since the integrated build no longer seems to work, this creates a separate Kirigami build using qmake (as I couldn't make Kirigami's cmake build work). The install target tries to install into the Qt install which may not be possible with a user account, so this instead uses the built library directly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'packaging')
-rwxr-xr-xpackaging/ios/build.sh23
1 files changed, 21 insertions, 2 deletions
diff --git a/packaging/ios/build.sh b/packaging/ios/build.sh
index bd0897c05..119ca06ad 100755
--- a/packaging/ios/build.sh
+++ b/packaging/ios/build.sh
@@ -125,7 +125,6 @@ for ARCH in $ARCHS; do
declare -x CXXFLAGS="$CFLAGS"
declare -x LDFLAGS="$CFLAGS -lsqlite3 -lpthread -lc++ -L$SDK_DIR/usr/lib -fembed-bitcode"
-
# openssl build stuff.
export DEVELOPER=$(xcode-select --print-path)\
export IPHONEOS_SDK_VERSION=$(xcrun --sdk iphoneos --show-sdk-version)
@@ -261,13 +260,33 @@ if [ "$DEBUGRELEASE" != "Release" ] ; then
fi
popd
+# build Kirigami
+mkdir -p "$PARENT_DIR"/kirigami-build
+pushd "$PARENT_DIR"/kirigami-build
+"$IOS_QT"/"$QT_VERSION"/ios/bin/qmake "$SUBSURFACE_SOURCE"/mobile-widgets/3rdparty/kirigami/kirigami.pro CONFIG+=release
+make
+#make install
+if [ "$DEBUGRELEASE" != "Release" ] ; then
+ "$IOS_QT"/"$QT_VERSION"/ios/bin/qmake "$SUBSURFACE_SOURCE"/mobile-widgets/3rdparty/kirigami/kirigami.pro CONFIG+=debug
+ make clean
+ make
+ #make install
+fi
+# since the install prefix for qmake is rather weirdly implemented, let's copy things by hand into the multiarch destination
+mkdir -p "$INSTALL_ROOT"/../lib/qml/
+cp -a org "$INSTALL_ROOT"/../lib/qml/
+popd
+
# now combine the libraries into fat libraries
ARCH_ROOT=$PARENT_DIR/install-root/ios
cp -a "$ARCH_ROOT"/x86_64/* "$ARCH_ROOT"
if [ "$TARGET" = "iphoneos" ] ; then
pushd "$ARCH_ROOT"/lib
for LIB in $(find . -type f -name \*.a); do
- lipo "$ARCH_ROOT"/armv7/lib/"$LIB" "$ARCH_ROOT"/arm64/lib/"$LIB" "$ARCH_ROOT"/x86_64/lib/"$LIB" -create -output "$LIB"
+ # libkirigamiplugin is already a fat library
+ if grep -v -q "kirigami" <<< "$LIB" ; then
+ lipo "$ARCH_ROOT"/armv7/lib/"$LIB" "$ARCH_ROOT"/arm64/lib/"$LIB" "$ARCH_ROOT"/x86_64/lib/"$LIB" -create -output "$LIB"
+ fi
done
popd
fi