From 1f3af0f35c16b3d125f494b60290a867375217d8 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 26 Jun 2020 15:16:30 +0200 Subject: [PATCH] CMake: Fix double-negation of feature CONFIG values The plugin-manifests feature has the "negative" CONFIG value "no_plugin_manifest". On negation, we're supposed to strip off the leading "no_" instead of adding another one. Change-Id: Id2c66da41f22881272d5b923f12b85d9fcc2c9d0 Reviewed-by: Alexandru Croitor --- cmake/QtFeature.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/QtFeature.cmake b/cmake/QtFeature.cmake index 6a26824bd49..c0e1313a459 100644 --- a/cmake/QtFeature.cmake +++ b/cmake/QtFeature.cmake @@ -320,7 +320,11 @@ function(qt_evaluate_qmake_config_values key) set(expected "NOT") if (arg_NEGATE) set(expected "") - string(PREPEND arg_NAME "no_") + if(arg_NAME MATCHES "^no_(.*)") + set(arg_NAME "${CMAKE_MATCH_1}") + else() + string(PREPEND arg_NAME "no_") + endif() endif() # The feature condition is false, there is no need to export any config values.