Make 'use' entries work across module boundaries
'use' entries in the tests and libraries sections of configure.json files should work acrosss library boundaries, so a test in qtwayland can refer to a library from qtbase. Change-Id: Ide02b9985be427a27982a422ca84a29b23145bcf Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
parent
94f9ee79a6
commit
c64e4bf6b4
@ -675,13 +675,33 @@ defineTest(qtConfTest_library) {
|
|||||||
|
|
||||||
defineTest(qtConfTestPrepare_compile) {
|
defineTest(qtConfTestPrepare_compile) {
|
||||||
for (u, $$list($$eval($${1}.use))) {
|
for (u, $$list($$eval($${1}.use))) {
|
||||||
!contains($${currentConfig}.libraries._KEYS_, $$u): \
|
libConfig =
|
||||||
error("Test $$1 tries to use undeclared library '$$u'")
|
contains($${currentConfig}.libraries._KEYS_, $$u) {
|
||||||
qtConfHandleLibrary($$u)
|
libConfig = $${currentConfig}
|
||||||
lpfx = $${currentConfig}.libraries.$${u}
|
qtConfHandleLibrary($$u)
|
||||||
isEmpty($${lpfx}.source): \
|
} else {
|
||||||
return(false)
|
for (d, QMAKE_CONFIG_DEPS) {
|
||||||
$${1}.literal_args += $$qtConfLibraryArgs($${lpfx}.sources.$$eval($${lpfx}.source))
|
contains($${d}.libraries._KEYS_, $$u) {
|
||||||
|
libConfig = $$d
|
||||||
|
break()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
isEmpty(libConfig) {
|
||||||
|
nu = $$upper($$u)
|
||||||
|
libs = $$eval(QMAKE_LIBS_$$nu) $$eval(QMAKE_LIBS_$${nu}_DEBUG) $$eval(QMAKE_LIBS_$${nu}_RELEASE)
|
||||||
|
defines = $$eval(QMAKE_DEFINES_$${nu})
|
||||||
|
includes = $$eval(QMAKE_INCDIR_$${nu})
|
||||||
|
|
||||||
|
isEmpty(libs):isEmpty(defines):isEmpty(includes): \
|
||||||
|
error("Test $$1 tries to use undeclared library '$$u'")
|
||||||
|
$${1}.literal_args += $$system_quote(QMAKE_USE += $$u)
|
||||||
|
} else {
|
||||||
|
lpfx = $${libConfig}.libraries.$${u}
|
||||||
|
isEmpty($${lpfx}.source): \
|
||||||
|
return(false)
|
||||||
|
$${1}.literal_args += $$qtConfLibraryArgs($${lpfx}.sources.$$eval($${lpfx}.source))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
export($${1}.literal_args)
|
export($${1}.literal_args)
|
||||||
return(true)
|
return(true)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user