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
parent
2408166f5a
commit
8ccb46d80e
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue