From 6e0139caf761cc9d22ba7ea0770983782abdeaba Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Thu, 6 Mar 2025 14:38:40 +0100 Subject: [PATCH] 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. $ 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 Reviewed-by: Alexey Edelev (cherry picked from commit ce0004dff7b8a5f5030c2f060a659b9c5e6e62ea) Reviewed-by: Qt Cherry-pick Bot --- cmake/QtPublicWalkLibsHelpers.cmake | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cmake/QtPublicWalkLibsHelpers.cmake b/cmake/QtPublicWalkLibsHelpers.cmake index a7c40076921..7d3777d612e 100644 --- a/cmake/QtPublicWalkLibsHelpers.cmake +++ b/cmake/QtPublicWalkLibsHelpers.cmake @@ -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 "\\$") - 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 "\\$") + if(lib MATCHES "${_is_plugin_marker_genex}" OR lib MATCHES "${_is_skip_marker_genex}") continue() endif()