make use of QT_MODULES to simplify code
Change-Id: I1124088f807023faf678e030cfb1fc4a4c8b40d7 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
parent
65b749f5ea
commit
7d4980f3ee
@ -26,9 +26,8 @@ defineTest(qtAddLibrary) {
|
||||
warning("qtAddLibrary() is deprecated. Use qtAddModule() or QT+= instead.")
|
||||
|
||||
# Reverse-engineer the module name from the library name.
|
||||
for(var, $$list($$find($$list($$enumerate_vars()), ^QT\\.[^.]+\\.name$))) {
|
||||
isEqual($$var, $$1) {
|
||||
var ~= s,^QT\\.([^.]+)\\.name$,\\1,
|
||||
for(var, QT_MODULES) {
|
||||
isEqual(QT.$${var}.name, $$1) {
|
||||
qtAddModule($$var, , LIBS):return(true):break()
|
||||
return(false):break() # Yes, the break is insanity. But necessary.
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user