diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-06-04 17:34:27 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-06-05 08:13:42 +0000 |
commit | 35dc8f496dc324a816dc17e80b744bfe864ec261 (patch) | |
tree | 440e961ad57766b2e1deefd54ad02178f6bb7f69 /cmake | |
parent | d0eb985f7413c62c2bff26caaf84bec2e6893131 (diff) |
Map module.gui to if TARGET Qt::Gui in configure.cmake
Some features check for module existence. Adapt conversion script
and QtBuild feature condition parser to handle that.
Change-Id: I063e49a6fe9f8e9cf3aec985fd78ed4430398586
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtFeature.cmake | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cmake/QtFeature.cmake b/cmake/QtFeature.cmake index c7e4764751..33b1c7a955 100644 --- a/cmake/QtFeature.cmake +++ b/cmake/QtFeature.cmake @@ -131,6 +131,14 @@ function(qt_evaluate_config_expression resultVar) string(COMPARE EQUAL "${lhs}" "${rhs}" stringCompareResult) list(APPEND result ${stringCompareResult}) + elseif("${member}" STREQUAL "TARGET" AND memberIdx LESS ${length}) + math(EXPR rhsIndex "${memberIdx}+1") + list(GET exists_target ${rhsIndex} rhs) + if(NOT TARGET "${exists_target}") + set(result "target_does_not_exist") + break() + endif() + set(skipNext ON) else() string(FIND "${member}" "QT_FEATURE_" idx) if(idx EQUAL 0) |