summaryrefslogtreecommitdiffstats
path: root/cmake/QtTargetHelpers.cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2023-12-14 16:11:24 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2023-12-15 14:52:09 +0100
commitcab76abc613b94c70121a1bc3b7f403dbd12af9d (patch)
tree022ae6b1f8e778d3825f0b2a4ad327a9db824739 /cmake/QtTargetHelpers.cmake
parent3b71f9dc297f73d140f3c185c67476df5e0266a5 (diff)
CMake: Fix non-prefix debug exclusion check for additional info props
The condition was checking if excluded_genex variables is not an empty string. But when the EXCLUDE_FROM_ALL property was unset, the value of excluded_genex would be "excluded_genex-NOTFOUND" which would fail the condition, and would end up always adding the generated code block. Instead of checking for an empty string, check if it's a truth-y value. This ensures not to add the code block when the property is unset. Amends 7540b4bd5634c9104a99f9b219531b1e3dd7942d Change-Id: I126c745e2e6eccad34171456c052a14cad9d887d Pick-to: 6.7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: 🌴 Alexey Edelev 🌴 <alexey.edelev@qt.io>
Diffstat (limited to 'cmake/QtTargetHelpers.cmake')
-rw-r--r--cmake/QtTargetHelpers.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/QtTargetHelpers.cmake b/cmake/QtTargetHelpers.cmake
index 98ac4cc29c..9757a8e7fc 100644
--- a/cmake/QtTargetHelpers.cmake
+++ b/cmake/QtTargetHelpers.cmake
@@ -852,7 +852,7 @@ endif()
# the target. It is not built by default.
if(NOT QT_WILL_INSTALL AND QT_FEATURE_debug_and_release)
get_target_property(excluded_genex ${target} EXCLUDE_FROM_ALL)
- if(NOT excluded_genex STREQUAL "")
+ if(excluded_genex)
string(APPEND content "
# ${full_target} is not built by default in the Debug configuration. Check existence.
get_target_property(_qt_imported_location ${full_target} IMPORTED_LOCATION_DEBUG)