diff options
-rw-r--r-- | configure.json | 2 | ||||
-rw-r--r-- | configure.pri | 14 |
2 files changed, 12 insertions, 4 deletions
diff --git a/configure.json b/configure.json index 77f956ed1a..2c27891729 100644 --- a/configure.json +++ b/configure.json @@ -423,7 +423,7 @@ "features": { "prepare": { - "output": [ "prepareSpec", "prepareOptions", "preparePaths" ] + "output": [ "prepareSpec", "prepareOptions", "preparePaths", "reloadSpec" ] }, "machineTuple": { "condition": "!config.linux || config.android || tests.machineTuple", diff --git a/configure.pri b/configure.pri index 7dd1069c0b..10eb8b287e 100644 --- a/configure.pri +++ b/configure.pri @@ -593,9 +593,8 @@ defineTest(qtConfOutput_prepareOptions) { export($${currentConfig}.output.devicePro) - # reload the spec to make the settings actually take effect. - !isEmpty($${currentConfig}.output.devicePro): \ - reloadSpec() + # if any settings were made, the spec will be reloaded later + # to make them take effect. } defineTest(qtConfOutput_machineTuple) { @@ -842,6 +841,15 @@ defineTest(qtConfOutput_preparePaths) { "Prefix=$$QT_SOURCE_TREE" write_file($$QT_BUILD_TREE/bin/qt.conf, cont)|error() reload_properties() + + # if a sysroot was configured, the spec will be reloaded later, + # as some specs contain $$[SYSROOT] references. +} + +defineTest(qtConfOutput_reloadSpec) { + !isEmpty($${currentConfig}.output.devicePro)| \ + !isEmpty(config.input.sysroot): \ + reloadSpec() } defineTest(qtConfOutput_shared) { |