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 09:15:04 +0000 |
commit | 2401435d89c62be48ee7cf798aa3f47fb3faf670 (patch) | |
tree | 278fb210d6fb41ef16a657991e53eb8da0c49182 | |
parent | bfa209dfa557e7c30d654add09f5c8f97cfc2492 (diff) |
Map module.gui to if TARGET Qt::Gui in configure.cmake
Some features check for module / target existence. Adapt conversion
script to handle that.
Reland after fixing it.
Change-Id: If4fb942c2e0d16e76a0b9b767bf478527851b0f7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r-- | cmake/QtFeature.cmake | 2 | ||||
-rwxr-xr-x | util/cmake/configurejson2cmake.py | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/cmake/QtFeature.cmake b/cmake/QtFeature.cmake index 758605c05a..8d7006a4de 100644 --- a/cmake/QtFeature.cmake +++ b/cmake/QtFeature.cmake @@ -142,6 +142,8 @@ function(qt_evaluate_config_expression resultVar) list(APPEND result ${member}) endif() endforeach() + # The 'TARGET Gui' case is handled by qt_evaluate_to_boolean, by passing those tokens verbatim + # to if(). if("${result}" STREQUAL "") set(result ON) diff --git a/util/cmake/configurejson2cmake.py b/util/cmake/configurejson2cmake.py index 890d4dfc5f..2de2567803 100755 --- a/util/cmake/configurejson2cmake.py +++ b/util/cmake/configurejson2cmake.py @@ -281,6 +281,8 @@ def map_condition(condition): elif match.group(1) == 'config': substitution = map_platform(match.group(2)) + elif match.group(1) == 'module': + substitution = 'TARGET {}'.format(map_qt_library(match.group(2))) elif match.group(1) == 'arch': if match.group(2) == 'i386': |