38e935701c
this is complementary to configure's makeSpec library source type. this should be sufficient to make QMAKE_USE += {egl,opengl,opengl_es2} actually work, obsoleting the need for opengl.prf and egl.prf (and the currently dysfunct openvg.prf). Change-Id: I2f7595ac89afa087ea7f0f25060e8e47e6148be9 Reviewed-by: Andy Nichols <andy.nichols@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
32 lines
931 B
Plaintext
32 lines
931 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)
|
|
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"
|
|
}
|