qt.sh 1.4 KB

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