qt.sh 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/bin/bash
  2. # Build Qt
  3. set -e
  4. BASEDIR=$PWD/thirdparty/qt
  5. DEPLOYDIR=$BASEDIR/install
  6. QT_MAJOR=6
  7. QT_MINOR=1
  8. QT_BUGFIX=0
  9. 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"
  10. mkdir -p $BASEDIR
  11. if [ -d $DEPLOYDIR ]; then
  12. rm -rf $DEPLOYDIR
  13. fi
  14. mkdir -p $DEPLOYDIR
  15. pushd $BASEDIR
  16. if [ ! -f qt-everywhere-src-$QT_MAJOR.$QT_MINOR.$QT_BUGFIX.tar.xz ]; then
  17. wget $URL
  18. fi
  19. if [ -d "qt-everywhere-src-$QT_MAJOR.$QT_MINOR.$QT_BUGFIX" ]; then
  20. rm -rf "qt-everywhere-src-$QT_MAJOR.$QT_MINOR.$QT_BUGFIX"
  21. fi
  22. tar -xf "qt-everywhere-src-$QT_MAJOR.$QT_MINOR.$QT_BUGFIX.tar.xz"
  23. pushd "qt-everywhere-src-$QT_MAJOR.$QT_MINOR.$QT_BUGFIX"
  24. ./configure -static -ltcg -optimize-size -no-pch -prefix $DEPLOYDIR -release -opensource -confirm-license \
  25. -nomake examples -nomake tests -nomake tools \
  26. -no-xcb -no-glib -no-harfbuzz -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc \
  27. -no-sql-psql -no-sql-sqlite -no-cups -no-qml-debug \
  28. -skip qtscxml -skip qtwayland -skip qtdatavis3d -skip qtcharts \
  29. -skip qtquickcontrols2 -skip qtvirtualkeyboard -skip qtshadertools \
  30. -skip qttranslations -skip qtdoc -skip qt3d -skip qtnetworkauth \
  31. -skip qt5compat -skip qtcoap -skip qtlottie -skip qtmqtt \
  32. -skip qtopcua -skip qtquick3d -skip qtquicktimeline -skip qttools \
  33. -skip qtdeclarative -skip qtactiveqt
  34. cmake --build . --parallel
  35. cmake --install .
  36. popd