Useful resources for using Qt with the popular build system
CMake will become the default build system for Qt 6. For years now, KDAB has assisted our customers with our CMake expertise and KDAB’s Kevin Funk is the Qt maintainer for the CMake build system.
Here, for your convenience, we have collected CMake-related resources we have published over time. We’ll update it whenever new items are created.
CMake and Qt – whitepaper
CMake can help control your build process, manage and make use of dependencies, simplify file manipulation and much more. Since most of the Qt community will likely end up embracing CMake at some point, we have put together a full critique.
Using Modern CMake with Qt
KDAB’s Kevin Funk presented Using Modern CMake with Qt at Qt Virtual Tech Con 2020 and there was a lively Q&A at the end – Kevin had to pick from about 60 questions. In this talk, Kevin introduced Qt specific CMake functionalities for finding and using Qt5 inside your personal CMake-based project, using modern CMake capabilities. He discusses how to find Qt installs using CMake’s find_package function and how to find specific Qt versions when multiple versions are installed. He also covers useful CMake variables.
Using Visual Studio Code for Qt Applications – Part Two
In this second part of Using Visual Studio Code for Qt Applications Alessandro Ambrosano shows you how to get a complete setup for your qmake and CMake projects, whilst having a deeper look at the Qt side. Setting up a CMake based project using the CMake extension doesn’t require any settings manipulation if Qt is already configured on your system. What you will need is to select a CMake kit (the CMake extension finds them automatically), a build variant, and launch the build with F7. Read more…
Introduction to CMake training
CMake is the de facto standard build system for C and C++ outside of frameworks that require their own. It has earned this place by supporting the situations and special cases that arise in real projects. CMake even has strong support for building Qt applications, and it’s a good alternative if you hit limitations in qmake. This course will teach the basics of creating and building projects with CMake. In recent years, CMake has introduced some cleaner and more precise constructs. Find out more…
Qt on CMake Workshop Summary – May ’19
This is a follow-up post to Qt on CMake Workshop Summary – Feb ’19. This workshop was mostly intended to reassess what has happened in the wip/cmake branch of qtbase since the last workshop and to discuss any further work. We spent almost half of the first day just deciding how to approach certain things such as how the CMake build system port will affect the upcoming Qt6 work, which is currently gaining momentum as well. Read more…
Qt on CMake Workshop Summary – Feb ’19
The Qt Project believes that building Qt with CMake is our best bet in Qt6 times and thus a group of people have started to build a CMake build system prototype. KDAB has a track record of helping out with the CMake support in Qt. At the time of writing, KDAB is largely responsible for maintaining the CMake support of Qt5. Read more…
QtCreator CMake for Android plugin
KDAB has contributed the QtCreator CMake for Android plugin to Qt. This plugin enables a painless experience for creating Android apps using Qt, CMake and QtCreator. With this plugin the user can build, run & debug Qt on Android Apps with CMake as easy as they do with Qmake. Read more…
Using CMake with Qt 5
The basics of a powerful build system alternative to QMake
When creating large or complex software, CMake can be more suitable to use than QMake. KDAB engineers have contributed some features to CMake to ensure that the Qt 5 support for CMake is as good as possible. Read more…