CMake: Don't use GUI for tests that use QT += testlib-private

Change-Id: I90cac19928d6e6e30214a6480a5855479a8d4d77
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Alexandru Croitor 2020-03-19 12:42:04 +01:00
parent edf5fe49b3
commit ab60f32d6f

View File

@ -3678,9 +3678,9 @@ def handle_app_or_lib(
is_plugin = "plugin" in config
is_qt_plugin = any("qt_plugin" == s for s in scope.get("_LOADED")) or is_qml_plugin
target = ""
gui = all(
val not in config for val in ["console", "cmdline", "-app_bundle"]
) and "testlib" not in scope.expand("QT")
gui = all(val not in config for val in ["console", "cmdline", "-app_bundle"]) and all(
val not in scope.expand("QT") for val in ["testlib", "testlib-private"]
)
if is_jar:
write_jar(cm_fh, scope, indent=indent)