diff options
-rw-r--r-- | configure.cmake | 2 | ||||
-rw-r--r-- | src/gui/configure.cmake | 3 | ||||
-rwxr-xr-x | util/cmake/configurejson2cmake.py | 13 |
3 files changed, 12 insertions, 6 deletions
diff --git a/configure.cmake b/configure.cmake index 330c5347c5..cec2bfa183 100644 --- a/configure.cmake +++ b/configure.cmake @@ -243,7 +243,7 @@ qt_feature("developer_build" ) qt_feature("private_tests" PRIVATE LABEL "Developer build: private_tests" - AUTODETECT OFF + CONDITION QT_FEATURE_developer_build ) qt_feature_definition("developer_build" "QT_BUILD_INTERNAL") qt_feature("appstore_compliant" PUBLIC diff --git a/src/gui/configure.cmake b/src/gui/configure.cmake index f674311ed2..8924d8da5d 100644 --- a/src/gui/configure.cmake +++ b/src/gui/configure.cmake @@ -655,8 +655,7 @@ qt_feature("opengl_dynamic" ) qt_feature("dynamicgl" PUBLIC LABEL "Dynamic OpenGL: dynamicgl" - AUTODETECT OFF - CONDITION WIN32 AND NOT WINRT + CONDITION QT_FEATURE_opengl_dynamic DISABLE INPUT_angle STREQUAL 'yes' OR INPUT_opengl STREQUAL 'no' OR INPUT_opengl STREQUAL 'desktop' ) qt_feature_definition("opengl_dynamic" "QT_OPENGL_DYNAMIC") diff --git a/util/cmake/configurejson2cmake.py b/util/cmake/configurejson2cmake.py index f929ac142d..bede5934a5 100755 --- a/util/cmake/configurejson2cmake.py +++ b/util/cmake/configurejson2cmake.py @@ -788,7 +788,7 @@ def parseFeature(ctx, feature, data, cm_fh): cxxFeature = featureName(feature) - def writeFeature(name, publicFeature=False, privateFeature=False, labelAppend=''): + def writeFeature(name, publicFeature=False, privateFeature=False, labelAppend='', superFeature=None, autoDetect=''): if comment: cm_fh.write('# {}\n'.format(comment)) @@ -804,7 +804,11 @@ def parseFeature(ctx, feature, data, cm_fh): if purpose != label: cm_fh.write(lineify('PURPOSE', purpose)) cm_fh.write(lineify('AUTODETECT', autoDetect, quote=False)) - cm_fh.write(lineify('CONDITION', condition, quote=False)) + if superFeature: + feature_condition = "QT_FEATURE_{}".format(superFeature) + else: + feature_condition = condition + cm_fh.write(lineify('CONDITION', feature_condition, quote=False)) cm_fh.write(lineify('ENABLE', enable, quote=False)) cm_fh.write(lineify('DISABLE', disable, quote=False)) cm_fh.write(lineify('EMIT_IF', emitIf, quote=False)) @@ -814,7 +818,7 @@ def parseFeature(ctx, feature, data, cm_fh): # Default internal feature case. featureCalls = {} - featureCalls[cxxFeature] = {'name': cxxFeature, 'labelAppend': ''} + featureCalls[cxxFeature] = {'name': cxxFeature, 'labelAppend': '', 'autoDetect': autoDetect} # Go over all outputs to compute the number of features that have to be declared for o in output: @@ -836,6 +840,9 @@ def parseFeature(ctx, feature, data, cm_fh): if name not in featureCalls: featureCalls[name] = {'name': name, 'labelAppend': labelAppend} + if name != cxxFeature: + featureCalls[name]['superFeature'] = cxxFeature + if outputType in ['feature', 'publicFeature']: featureCalls[name]['publicFeature'] = True elif outputType == 'privateFeature': |