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 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: 🌴 Alexey Edelev 🌴 <alexey.edelev@qt.io> (cherry picked from commit cab76abc613b94c70121a1bc3b7f403dbd12af9d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
a111504baa
commit
93e7486fd6
@ -853,7 +853,7 @@ endif()
|
|||||||
# the target. It is not built by default.
|
# the target. It is not built by default.
|
||||||
if(NOT QT_WILL_INSTALL AND QT_FEATURE_debug_and_release)
|
if(NOT QT_WILL_INSTALL AND QT_FEATURE_debug_and_release)
|
||||||
get_target_property(excluded_genex ${target} EXCLUDE_FROM_ALL)
|
get_target_property(excluded_genex ${target} EXCLUDE_FROM_ALL)
|
||||||
if(NOT excluded_genex STREQUAL "")
|
if(excluded_genex)
|
||||||
string(APPEND content "
|
string(APPEND content "
|
||||||
# ${full_target} is not built by default in the Debug configuration. Check existence.
|
# ${full_target} is not built by default in the Debug configuration. Check existence.
|
||||||
get_target_property(_qt_imported_location ${full_target} IMPORTED_LOCATION_DEBUG)
|
get_target_property(_qt_imported_location ${full_target} IMPORTED_LOCATION_DEBUG)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user