From cd8b7fb86517cda1adbfe8fda7beaafddfe5c9bb Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 29 Sep 2016 17:57:53 +0200 Subject: make QMAKE_USE parameterizable it's now possible to declare references which don't cause linking (or cause only linking). make use of this in the xcb-static library. Change-Id: Ic429e0a1200b3a333738ea8d8e576ff64b6cac21 Reviewed-by: Laszlo Agocs Reviewed-by: Oswald Buddenhagen --- mkspecs/features/qmake_use.prf | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qmake_use.prf b/mkspecs/features/qmake_use.prf index 41d959cf83..a8e2e6c417 100644 --- a/mkspecs/features/qmake_use.prf +++ b/mkspecs/features/qmake_use.prf @@ -1,7 +1,9 @@ suffix = for(ever) { QMAKE_USE$${suffix} = $$unique(QMAKE_USE$${suffix}) - for (name, 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) @@ -13,9 +15,12 @@ for(ever) { isEmpty(libs):isEmpty(cflags): \ error("Library '$$name' is not defined.") - LIBS$${suffix} += $$libs - QMAKE_CFLAGS += $$cflags - QMAKE_CXXFLAGS += $$cflags + !contains(use, nolink): \ + LIBS$${suffix} += $$libs + !contains(use, linkonly) { + QMAKE_CFLAGS += $$cflags + QMAKE_CXXFLAGS += $$cflags + } } !isEmpty(suffix): break() suffix = "_PRIVATE" -- cgit v1.2.3