diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-02-09 17:35:30 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-02-22 07:46:50 +0000 |
commit | 8ccb46d80ee3271423f7151be5130ea243aa125b (patch) | |
tree | b51e962ad21784539e1bc249a7d9ded31f259e24 /mkspecs | |
parent | 2408166f5a235575af7e55de4a2ff75a5921ce81 (diff) |
configure: fix cross-module library uses
this went unnoticed, because the only cross-module 'use' so far is that
of egl, for which the code path provided for modular builds happens to
(mostly) work due to the specs already providing the library definition.
amends cc842ca4.
Change-Id: I58c638d896eabd26f27d5cd90e3a7f8eeece9bc0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/features/qt_configure.prf | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index a6cbc25d6c..537355dfb8 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -757,7 +757,7 @@ defineTest(qtConfTestPrepare_compile) { libConfig = $${currentConfig} qtConfHandleLibrary($$u) } else { - for (d, QMAKE_CONFIG_DEPS) { + for (d, QMAKE_LIBRARY_DEPS) { contains($${d}.libraries._KEYS_, $$u) { libConfig = $$d break() @@ -1813,8 +1813,6 @@ for(ever) { jsonFile = $$thisDir/configure.json priFile = $$thisDir/configure.pri - allConfigs += $$currentConfig - # load configuration data configure_data = $$cat($$jsonFile, blob) !parseJson(configure_data, $$currentConfig): \ @@ -1822,6 +1820,21 @@ for(ever) { exists($$priFile): \ !include($$priFile): error() + # only configs which contain more than just subconfigs are saved for later. + $${currentConfig}._KEYS_ -= subconfigs + !isEmpty($${currentConfig}._KEYS_) { + allConfigs += $$currentConfig + contains($${currentConfig}._KEYS_, libraries) { + qtConfSetupLibraries() + # this ensures that references in QMAKE_LIBRARY_DEPS are unique. + qtConfSetModuleName() + ex = $$eval(config.modules.$${currentModule}) + !isEmpty(ex): \ + error("Module $$currentModule is claimed by both $$currentConfig and $${ex}.") + config.modules.$${currentModule} = $$currentConfig + } + } + # prepend all subconfigs to files to keep a depth first search order subconfigs = for(n, $${currentConfig}.subconfigs._KEYS_) { @@ -1836,9 +1849,6 @@ for(ever) { configsToProcess = $$subconfigs $$configsToProcess } -for (currentConfig, allConfigs): \ - qtConfSetupLibraries() - QMAKE_SAVED_ARGS = $$QMAKE_EXTRA_ARGS QMAKE_REDO_CONFIG = false qtConfParseCommandLine() @@ -1948,11 +1958,15 @@ for (currentConfig, allConfigs) { # correctly setup dependencies QMAKE_CONFIG_DEPS = global global_private + QMAKE_LIBRARY_DEPS = $$eval(config.modules.global) !isEmpty($${currentConfig}.module) { for (d, $${currentConfig}.depends._KEYS_) { dep = $$replace($${currentConfig}.depends.$$d, -private$, _private) - dep *= $$replace(dep, _private$, ) + gdep = $$replace(dep, _private$, ) + dep *= $$gdep QMAKE_CONFIG_DEPS += $$dep + !isEqual(gdep, $$dep): \ # libraries are in the private module. + QMAKE_LIBRARY_DEPS += $$eval(config.modules.$$gdep) } } |