Welcome: Hunan Intelligent Applications Tecgnology CO.,ltd.-HNIAT.com
Language: Chinese ∷  English

Basic knowledge

Talking about the compilation method of Qt: qmake/cmake/qbs and the reason why qbs is deprecated

1. Introduction to Qbs

https://doc.qt.io/qbs/qml-qbsmodules-qbs.html

https://blog.csdn.net/qq_34139994/article/details/98478648

QBS (Qt Build Suite) is a build tool like qmake and cmake. QBS claims to be a new generation of build tools that compile faster than qmake.

Unlike qmake, qbs is not bound to the Qt version, it generates a correct compilation table (dependency table) from the high-level project description in the project file. The traditional MakeFile generation tools such as qmake and CMake generate makefile files, and then leave the actual commands to tools such as make or ninja to execute. Another aspect of Qbs is that it acts as a parallel build and direct invocation of compilers, linkers, and other tools, much like what SCons and Ant do.
 

2. Qt official statement: Due to market reasons, Qbs is deprecated

https://www.qt.io/blog/2018/10/29/deprecation-of-qbs

The Qt Company has been supporting three different build systems for Qt programs. For Qt users, qmake is currently the most widely used build system. CMake is second and growing in popularity. In third place is Qbs, with significantly lower adoption. When asked about their preference, most of our customers said they plan to use CMake or qmake in the future.

We have decided to deprecate Qbs and redirect resources to add support for CMake. Qbs will be supported with Qt Creator 4.9 until the end of 2019, with a final planned release in April 2019. Qbs is available under both a commercial license and an open source license, and we are excited to continue to provide the Qt Project community with the infrastructure for further development.

Summary points:

Qbs will continue to be supported until the end of 2019
The latest Qbs version will be released in April 2019
Qbs continues to work with the upcoming Qt Creator 4.8 and Qt Creator 4.9
Qbs libraries and tools will be provided under the Qt project for further development by the community
Support for qmake will remain unaffected
Support for CMake will be improved
In the long term we plan to switch to CMake to build Qt itself
CMake support in Qt Creator will be further improved
Deprecating Qbs allowed us to significantly improve CMake support. We believe this change will help more and more customers prefer to use the CMake build system. The widespread adoption of CMake outside of Qt and its active development ecosystem are also beneficial.

 

3. Qt6 will focus on supporting CMake

The advantages of cmake are that it is very widely used in the C++ ecosystem (KDE as well as many other applications), has very wide support in many IDEs and other tools (eg VCPkg, Conan, etc.), and has a lot of knowledge about the ecosystem Build systems available in the system. Using it with Qt 6 also means we can focus our support on two build systems (qmake and cmake) for users without having to add a third to the mix.

In the long term, we want to phase out qmake to build Qt itself and use CMake instead. Even after this, qmake can still be used to build the application. We will of course continue to provide precompiled binaries, which most Qt users prefer.

 

4 Conclusion

(1) Qbs was officially abandoned

(2) Qt6 builds with qmake and cmake

(3) Qt will replace the qmake location with cmake in the future

 

-----

Recommend a powerful C++ IDE to build projects with CMake

https://www.jetbrains.com/clion/
———————————————
Copyright statement: This article is an original article by CSDN blogger "libaineu2004", and follows the CC 4.0 BY-SA copyright agreement. Please attach the original source link and this statement for reprinting.
Original link: https://blog.csdn.net/libaineu2004/article/details/104727963/

CONTACT US

Contact: Manager Xu

Phone: 13907330718

Tel: 0731-22222718

Email: hniatcom@163.com

Add: Room 603, 6th Floor, Shifting Room, No. 2, Orbit Zhigu, No. 79 Liancheng Road, Shifeng District, Zhuzhou City, Hunan Province

Scan the qr codeClose
the qr code