cmake: QtFeature: Do not error out when using Qt
... outside of qtbase.git Change-Id: I1895ef07c881766e2b28839d0422916b6916e10e Reviewed-by: Jean-Michaël Celerier <jean-michael.celerier@kdab.com> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
parent
c5e2838b64
commit
2635ab01d2
@ -430,8 +430,8 @@ function(qt_make_features_available target)
|
||||
continue()
|
||||
endif()
|
||||
foreach(feature IN ITEMS ${features})
|
||||
if (DEFINED "QT_FEATURE_${feature}")
|
||||
message(FATAL_ERROR "Feature ${feature} is already defined when importing features from ${target}.")
|
||||
if (DEFINED "QT_FEATURE_${feature}" AND NOT "${QT_FEATURE_${feature}}" STREQUAL "${value}")
|
||||
message(FATAL_ERROR "Feature ${feature} is already defined and has a different value when importing features from ${target}.")
|
||||
endif()
|
||||
set(QT_FEATURE_${feature} "${value}" CACHE INTERNAL "Qt feature: ${feature} (from target ${target})")
|
||||
endforeach()
|
||||
|
Loading…
x
Reference in New Issue
Block a user