CMake: Add a special skip genex marker when walking libs

Useful to annotate certain linking expressions that need to be skipped
for inclusion in prl file generation. E.g. $<TARGET_OBJECTS>
expressions that represent propagated object libraries, which are
handled by the rcc_objects walk lib code path, and thus need to end up
in prl RCC_OBJECTS section, instead of the
QMAKE_PRL_LIBS_FOR_CMAKE one.

Pick-to: 6.8
Change-Id: Ib08b00200b6b06d32eab15ecb15c0820eec2a908
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit ce0004dff7b8a5f5030c2f060a659b9c5e6e62ea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Alexandru Croitor 2025-03-06 14:38:40 +01:00 committed by Qt Cherry-pick Bot
parent 0c7bea06c4
commit 6e0139caf7

View File

@ -153,9 +153,16 @@ function(__qt_internal_walk_libs
lib "${lib}")
endwhile()
# Skip static plugins.
# Skip processing static plugins.
# There are some abuses of this genex marker, because the more generic one below did
# not exist yet.
set(_is_plugin_marker_genex "\\$<BOOL:QT_IS_PLUGIN_GENEX>")
if(lib MATCHES "${_is_plugin_marker_genex}")
# Skip any genex expressions that contain the marker. Useful in cases like processing
# link expressions for prl file generation, where some link expressions should be
# skipped either because they don't make sense or they are handled differently.
set(_is_skip_marker_genex "\\$<BOOL:QT_SKIP_WALK_LIBS_PROCESSING>")
if(lib MATCHES "${_is_plugin_marker_genex}" OR lib MATCHES "${_is_skip_marker_genex}")
continue()
endif()