qt5base-lts/mkspecs/features/qmake_use.prf
Oswald Buddenhagen 521a85395d configure: actually resolve libraries into full filepaths
this considerably speeds up failures, as no doomed build is attempted,
and produces more reliable results, as no second lookup (which would be
subject to environment changes) is done any more during the build.

in principle, this also opens up possibilities like selecting specific
variants of dependencies, automatically extracting rpaths, etc.

qt_helper_lib.prf also needs to create fully resolved library names now.

Change-Id: I65f13564b635433030e40fa017427bbc72d1c130
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-12-03 11:25:56 +00:00

25 lines
783 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) {
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"
}