编译桌面端Qt.txt 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. ../configure \
  2. -debug-and-release \
  3. -confirm-license \
  4. -opensource \
  5. -platform win32-msvc \
  6. -prefix D:\EngineeringSoftware\Qt\Qt5.15.16\5.15.16\msvc2019_64 \
  7. -qt-sqlite \
  8. -qt-pcre \
  9. -qt-zlib \
  10. -qt-libpng \
  11. -qt-libjpeg \
  12. -qt-freetype \
  13. -qt-harfbuzz \
  14. -opengl desktop \
  15. -skip qtwebengine \
  16. -nomake tests \
  17. -no-compile-examples \
  18. -mp
  19. Windows版本建议从github直接下载
  20. 在\qtbase\mkspecs\common\msvc-version.conf中设置msvc版本,第一行设置:QMAKE_MSC_VER = 1929
  21. 编译MSVC版本
  22. configure -debug-and-release -confirm-license -opensource -platform win32-msvc -prefix D:\EngineeringSoftware\Qt\Qt5.15.16\5.15.16\msvc2019_32 -qt-sqlite -qt-pcre -qt-zlib -qt-libpng -qt-libjpeg -qt-freetype -qt-harfbuzz -opengl dynamic -skip qtwebengine -nomake tests -no-compile-examples -mp
  23. 编译GCC版本
  24. ../configure -debug-and-release -confirm-license -opensource -platform win32-g++ -prefix D:\EngineeringSoftware\Qt\Qt5.15.16\5.15.16\mingw81_32 -qt-sqlite -qt-pcre -qt-zlib -qt-libpng -qt-libjpeg -qt-freetype -qt-harfbuzz -opengl desktop -skip qtwebengine -nomake tests -no-compile-examples
  25. 编译Linux版本,从Windows里拷贝的压缩包可能有问题,直接下载官方的压缩包
  26. ../configure \
  27. -debug-and-release \
  28. -confirm-license -opensource \
  29. -platform linux-g++ \
  30. -prefix /home/Apple/Qt/Qt5.15.16 \
  31. -qt-sqlite -qt-pcre -qt-zlib -qt-libpng -qt-libjpeg -qt-freetype -qt-harfbuzz \
  32. -opengl desktop \
  33. -skip qtwebengine \
  34. -nomake tests \
  35. -no-compile-examples
  36. find . -type f -name "configure" -exec chmod a+x {} \;