Browse Source

Make compiling of Qt hopefully working on Wayland and macOS

Johannes Kreutz 3 years ago
parent
commit
e8d0b88d57
1 changed files with 17 additions and 4 deletions
  1. 17 4
      trackpoint-app/thirdparty/qt.sh

+ 17 - 4
trackpoint-app/thirdparty/qt.sh

@@ -4,7 +4,7 @@
 set -e
 
 if [ $1 == "release" ]; then
-  OPTIONS="-static"
+  OPTIONS="-static "
 else
   OPTIONS=""
 fi
@@ -19,6 +19,19 @@ QT_MAJOR=6
 QT_MINOR=1
 QT_BUGFIX=0
 
+UNAME_OUT="$(uname -s)"
+case "${UNAME_OUT}" in
+    Linux*)     MACHINE=Linux;;
+    Darwin*)    MACHINE=Mac;;
+    CYGWIN*)    MACHINE=Cygwin;;
+    MINGW*)     MACHINE=MinGw;;
+    *)          MACHINE="UNKNOWN:${UNAME_OUT}"
+esac
+
+if [ $MACHINE == "Linux" ]; then
+  OPTIONS+="-xcb "
+fi
+
 URL="https://download.qt.io/official_releases/qt/$QT_MAJOR.$QT_MINOR/$QT_MAJOR.$QT_MINOR.$QT_BUGFIX/single/qt-everywhere-src-$QT_MAJOR.$QT_MINOR.$QT_BUGFIX.tar.xz"
 
 mkdir -p "$BASEDIR"
@@ -41,14 +54,14 @@ fi
 tar -xf "qt-everywhere-src-$QT_MAJOR.$QT_MINOR.$QT_BUGFIX.tar.xz"
 pushd "qt-everywhere-src-$QT_MAJOR.$QT_MINOR.$QT_BUGFIX"
 
-./configure $OPTIONS -ltcg -optimize-size -no-pch -xcb -prefix "$DEPLOYDIR" -release -opensource -confirm-license \
+./configure $OPTIONS -ltcg -optimize-size -no-pch -prefix "$DEPLOYDIR" -release -opensource -confirm-license \
     -nomake examples -nomake tests -nomake tools \
-    -skip qtscxml -skip qtwayland -skip qtdatavis3d -skip qtcharts \
+    -skip qtscxml -skip qtdatavis3d -skip qtcharts \
     -skip qtquickcontrols2 -skip qtvirtualkeyboard -skip qtshadertools \
     -skip qttranslations -skip qtdoc -skip qt3d -skip qtnetworkauth \
     -skip qt5compat -skip qtcoap -skip qtlottie -skip qtmqtt \
     -skip qtopcua -skip qtquick3d -skip qtquicktimeline -skip qttools \
-    -skip qtdeclarative -skip qtactiveqt
+    -skip qtactiveqt
 
 cmake --build . --parallel $JOBS
 cmake --install .