qt5base-lts/mkspecs/features/qmake_use.prf

32 lines
931 B
Plaintext
Raw Normal View History

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)
debug: \
libs = $$eval(QMAKE_LIBS_$${nu}_DEBUG)
else: \
libs = $$eval(QMAKE_LIBS_$${nu}_RELEASE)
libs += $$eval(QMAKE_LIBS_$$nu)
libdir = $$eval(QMAKE_LIBDIR_$$nu)
defines = $$eval(QMAKE_DEFINES_$${nu})
includes = $$eval(QMAKE_INCDIR_$${nu})
isEmpty(libs):isEmpty(defines):isEmpty(includes): \
error("Library '$$name' is not defined.")
!contains(use, nolink) {
QMAKE_LIBDIR += $$libdir
LIBS$${suffix} += $$libs
}
!contains(use, linkonly) {
DEFINES += $$defines
INCLUDEPATH += $$includes
}
}
!isEmpty(suffix): break()
suffix = "_PRIVATE"
}