From 525a757158c3a4174f75cf0c97422129117989b2 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 28 Jan 2013 12:36:19 +0100 Subject: Build statically if Qt was built statically Change-Id: I47370bf3d30077ccfcc89ff705d0137875a8fc90 Reviewed-by: Oswald Buddenhagen Reviewed-by: Karsten Heimrich Reviewed-by: Tim Jenssen --- installerfw.pri | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'installerfw.pri') diff --git a/installerfw.pri b/installerfw.pri index 904099965..63a0b3825 100644 --- a/installerfw.pri +++ b/installerfw.pri @@ -52,6 +52,28 @@ equals(TEMPLATE, app):LIBS += -linstaller unix:!macx:LIBS += -lutil macx:LIBS += -framework Carbon -framework Security + +# +# Use same static/shared configuration as Qt +# +# Qt 5 sets QT_CONFIG +# Qt 4 / Windows sets CONFIG +# Qt 4 / Unix sets neither QT_CONFIG nor CONFIG +# + +!contains(CONFIG, static|shared) { + contains(QT_CONFIG, static): CONFIG += static + contains(QT_CONFIG, shared): CONFIG += shared + + !contains(CONFIG, static|shared) { + exists($$[QT_INSTALL_LIBS]/libQtCore.a)|exists($$[QT_INSTALL_LIBS]/libQtCore_debug.a) { + CONFIG += static + } else { + CONFIG += shared + } + } +} + isEqual(QT_MAJOR_VERSION, 4) { CONFIG += uitools CONFIG(static, static|shared) { -- cgit v1.2.3