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>
bb10
Oswald Buddenhagen 2017-02-09 17:35:30 +01:00
parent 2408166f5a
commit 8ccb46d80e
1 changed files with 21 additions and 7 deletions

View File

@ -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)
}
}