If certain 3rd party libraries have a version that's not suitable for
Qt, the configure summary should say so, rather than use them and fail
at build time.
With the current situation, we have to duplicate the version
information from the configure.json files in helper.py, by assigning
the version number as an extra find_package variable.
Rerunning configurejson2cmake then embeds this version info into the
qt_find_package calls in configure.cmake.
Some of the Find modules are rewritten to take the specified version
into account when looking for the libraries.
This involves moving around the code for creating a target, after
calling find_package_handle_standard_args() so we know if a good
enough version was found.
Task-number: QTBUG-82917
Change-Id: I139748d8090e0630cda413362760034dc3483e11
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Fixes the 'add_library cannot create imported target "dbus-1"
because another target with the same name already exists' error
when doing top-level static builds.
It's caused by the loading of Qt6DBus dependency when configuring
qttools.
Task-number: QTBUG-84874
Change-Id: Ia84ed460c4ce25de45fb41cb13edd0e63a276f11
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
If the target exists or the find_package() call succeeds
we still need to set _FOUND to 1.
Change-Id: Ib2267c30580082dcc177ab21708a3bc5dbde974f
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Qt CMake Build Bot
for pkgconfig it is different if they are not defined vs an empty string
Change-Id: Ifb05db5dab32a699aafa32d91f9719eab78dee44
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
DBus1 (1.12) configuration file breaks PKG_CONFIG environment
variables and will thus prevent other libraries to be picked up
by pkgconfig. Main sympthom is that xproto is not getting picked
up anymore, which results in hundreds of lines of warnings about
this being printed.
Work around that by wrapping the call to find_package(DBus1) and
restoring the environment.
Change-Id: Ia69f10b014dddc32045b40972500a843e5d29b38
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>