4f2a571f09
a header-only library in a default location would produce no variables at all, making it appear undefined. fix this by forcing the writeout of the QMAKE_LIBS_* variable, and use its definedness (rather than non-emptiness) as a signifier. this works for both QMAKE_USE and configure tests'/libraries' 'use' entries. Change-Id: Id7a1e23725caba1a91ea4db448b4aeb7fe632393 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
26 lines
837 B
Plaintext
26 lines
837 B
Plaintext
suffix =
|
|
for(ever) {
|
|
QMAKE_USE$${suffix} = $$unique(QMAKE_USE$${suffix})
|
|
for (use, QMAKE_USE$${suffix}) {
|
|
use = $$split(use, /)
|
|
name = $$take_first(use)
|
|
nu = $$upper($$name)
|
|
!defined(QMAKE_LIBS_$$nu, var): \
|
|
error("Library '$$name' is not defined.")
|
|
|
|
!contains(use, nolink) {
|
|
QMAKE_LIBDIR += $$eval(QMAKE_LIBDIR_$$nu)
|
|
debug: \
|
|
LIBS$${suffix} += $$eval(QMAKE_LIBS_$${nu}_DEBUG) $$eval(QMAKE_LIBS_$$nu)
|
|
else: \
|
|
LIBS$${suffix} += $$eval(QMAKE_LIBS_$${nu}_RELEASE) $$eval(QMAKE_LIBS_$$nu)
|
|
}
|
|
!contains(use, linkonly) {
|
|
DEFINES += $$eval(QMAKE_DEFINES_$${nu})
|
|
INCLUDEPATH += $$eval(QMAKE_INCDIR_$${nu})
|
|
}
|
|
}
|
|
!isEmpty(suffix): break()
|
|
suffix = "_PRIVATE"
|
|
}
|