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 <alexandru.croitor@qt.io>
This commit is contained in:
Joerg Bornemann 2020-06-26 15:16:30 +02:00
parent 375831a3dc
commit 1f3af0f35c

View File

@ -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.