CMake: Fix condition evaluation in plugin's DEFAULT_IF option

Expand the condition without an extra negation.

This fixes incorrect condition evaluation for conditions not enclosed
in parenthesis.

Change-Id: I4923059b6b199676058091c23d51c9368daaebd0
Reviewed-by: Craig Scott <craig.scott@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit c1ac201f5c9905751eb35531f26311c8d291f9cc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Alexandru Croitor 2021-04-08 13:32:26 +02:00 committed by Qt Cherry-pick Bot
parent efbcfcc067
commit abe4e3d2fb

View File

@ -151,12 +151,12 @@ function(qt_internal_add_plugin target)
set(_default_plugin 1)
endif()
if (DEFINED arg_DEFAULT_IF)
if (NOT ${arg_DEFAULT_IF})
set(_default_plugin 0)
else()
set(_default_plugin 1)
endif()
if(DEFINED arg_DEFAULT_IF)
if(${arg_DEFAULT_IF})
set(_default_plugin 1)
else()
set(_default_plugin 0)
endif()
endif()
# Save the Qt module in the plug-in's properties and vice versa