Qt 6 Additional Libraries via Package Manager
With Qt 6 we want to provide more flexibility via leveraging a package manager in addition to Qt Online Installer. The new package manager functionality, based on conan.io (https://conan.io), allows providing more packages to the users without increasing the complexity of the baseline Qt. In addition to the packages provided by Qt, the package manager can be used for getting content from other sources.
Initially, we have three Additional Libraries provided via the package manager: Qt Network Authorization, Qt Image Formats, and Qt 3D. More Additional Libraries will be available in forthcoming Qt 6 releases. We are currently leveraging the existing Qt delivery system as the backend for the Additional Libraries available via the package manager.
How the packages are managed?
The required tools, Conan, CMake, and Ninja, can be easily installed using the Qt Online installer 4.0, which is going to be released soon. The Conan build recipes for Additional Libraries require CMake and Ninja to build the module. The project linking to the module can be qmake-based as well.
Once installed, the selected Additional Libraries can be built once by using Conan per selected target configuration. After the build, the binary package is available in user’s local Conan cache, and can be linked to any other project.
How to get and build the packages?
An example build call looks like this:
$conan.exe install qtnetworkauth/6.0.0@qt/beta --build=missing
build_type=Release -g cmake_paths -g=cmake -g deploy
Now, let's look what that contains:
- This is the Conan reference for the package
- You can search available packages in your Conan cache by: $conan.exe search
- This file is installed by the Qt installer. Each Qt 6 Essential package installed by the Qt Installer installs also a matching profile file. This tells Conan the target build configuration.
- The user needs to select a suitable profile, that is the target build configuration.
- If your consuming project is a CMake project then use the CMake generators
- If your consuming project is a qmake project then you can pass: -g qmake
- The “deploy” generator deploys the built Additional Library from the Conan cache to your working environment. This is useful if you want to bundle your application files together.
For detailed steps see the instructions.
Currently, Qt Online Installer exports the Additional Library packages (sources and build recipes) into the Conan cache. There is no Conan remote that hosts the Additional Library Conan packages.
Like Qt 6.0, the current work is still in beta phase and all feedback is welcome. Note that currently the Conan profile files and build recipies for Android and iOS targets are being worked on. Also, the build recipes of the Additional Libraries are not part of the repositories yet. Once the build recipes are mature the plan is to move those into module repositories.
If you want to have a look already now, how the conanfile.py recipes look like, those can be found in the Qt installation, under each module in “AdditionalLibraries/Qt/”.
Subscribe to our newsletter
Try Qt 6.4 Now!
Download the latest release here: www.qt.io/download.
Qt 6 is the productivity platform for the future, with next-gen 2D & 3D UX and limitless scalability.
Explore Qt World
Check our Qt demos and case studies in the virtual Qt World
Check out all our open positions here and follow us on Instagram to see what it's like to be #QtPeople.
Näytä tämä julkaisu Instagramissa.
Want to build something for tomorrow, join #QtPeople today! We have loads of cool jobs you don't want to miss! http://qt.io/careers #builtwithQt #software #developers #coding #framework #tool #tooling #C++ #QML #engineers #sales #tech #technology #UI #UX #CX #Qt #Qtdev #global #openpositions #careers #job
Henkilön Qt (@theqtcompany) jakama julkaisu