From 8ccb46d80ee3271423f7151be5130ea243aa125b Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 9 Feb 2017 17:35:30 +0100 Subject: 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 --- mkspecs/features/qt_configure.prf | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'mkspecs/features/qt_configure.prf') 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) } } -- cgit v1.2.3