Can please someone explain in detail how to build a single qt module. I tried to understand the build sources documentation, but there is no info on how to build just a single module, let alone what to do with it after. I would like to do some modification on the qtmultimedia module, build it with the changes and use that module in my existing QT installation. I need only the IOS part.
3 Answers
From Qt 6 the build system is based on cmake. I found this blog post useful https://www.qt.io/blog/qt-6-build-system There is a section on "Building Qt Modules".
qt-configure-module is the tool of choice when building a Qt module separately against an installed Qt. The qt-configure-module script takes the same arguments a top-level Qt configure call would - restricted to the arguments that apply to the module we're currently configuring.
In the following example we first build and install qtbase, then qtdeclarative with the qml-network feature turned off.
mkdir ~/dev/qt/qtbase-build
cd ~/dev/qt/qtbase-build
../qtbase/configure -prefix /opt/Qt/6.0.0
cmake --build .
cmake --install .
mkdir ~/dev/qt/qtdeclarative-build
cd ~/dev/qt/qtdeclarative-build
/opt/Qt/6.0.0/bin/qt-configure-module ../qtdeclarative -no-qml-network
cmake --build .
cmake --install .
Comments
Use the qmake executable from the Qt build you want to build with to create a Makefile. Then run make.
<path_to_qt_build>/bin/qmake <path_to_module>
make [or nmake or jom for windows]