Resource objects might be linked to plugins. Since some plugins may
be present in LINK_LIBRARIES as the complex genexes, need to collect
them explicitly and iterate over plugin targets to find resource object
libraries that need to be exposed to end-point target executable.
Amends a1fd4f51ad
Change-Id: Icd85f54f7bf9d1b7e3382caa5d9aa62449b6adb8
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Avoid getting the LINK_LIBRARY property of the interface libraries
when calling a resource object finalizer.
Amends a1fd4f51ad
Change-Id: I19d625a927c66994902f5c89e6c82183c94af91e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
In the previous implementation of the resource object finalizer, we
used the name of the resource object library without namespaces when
recording it in the resource libraries list. This causes an issue when
we or users export resource targets.
This approach marks resource object libraries with the exporting
property instead of collecting resource targets when creating them.
Amends 19e789bace
Change-Id: I8596815921f2c681ddd78d9b2e9a4e1cafe5000b
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This proposal collects all the resource objects to the qt-specific
property of the static libraries. This is done to avoid littering
of other static libraries and put resource object files to the
source part of the linker line when linking the end-point
executable.
The way we link object resource libraries is changed back to the
target_link_libraries approach as we may omit using finalizers
with linkers other than ld. Users may enforce finalizers by calling
the qt6_enable_resource_objects_finalizer_mode function if need.
Refactor tests related to the static resources.
Amends ddaa7150d8
Task-number: QTBUG-93002
Change-Id: I74135e291cd82fb54d1b284b4b4a1e002b1fef98
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Needed for the upcoming static plugin mechanism, where we have to
extract the list of Qt module dependencies of a target and then extract
the plugins associated with those modules.
To do that we need to recursively collect the dependencies of a given
target.
Rename the moved functions to contain the __qt_internal prefix.
Also rename the existing QtPublicTargetsHelpers.cmake into
QtPlatformTargetHelpers.cmake to avoid confusion with the newly
introduced QtPublicTargetHelpers.cmake.
Task-number: QTBUG-92933
Change-Id: I48b5b6a8718a3424f59ca60f11fc9e97a809765d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>