diff options
author | Kai Koehne <kai.koehne@digia.com> | 2013-01-28 12:36:19 +0100 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@digia.com> | 2013-01-30 16:22:23 +0100 |
commit | 525a757158c3a4174f75cf0c97422129117989b2 (patch) | |
tree | 5884f9552b040fa7403bd17b075ea3aadf0f75a6 /installerfw.pri | |
parent | 3b5a603f166696c7d541f0e2893cdbcb83cc9f5a (diff) |
Build statically if Qt was built statically
Change-Id: I47370bf3d30077ccfcc89ff705d0137875a8fc90
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
Diffstat (limited to 'installerfw.pri')
-rw-r--r-- | installerfw.pri | 22 |
1 files changed, 22 insertions, 0 deletions
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) { |