From 3618c4e248bc1aba1028f3c4ba0cfd8eecbe716d Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Sat, 21 Apr 2012 16:10:49 +0000 Subject: fix win32 shared library linking --- qxmpp.pri | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/qxmpp.pri b/qxmpp.pri index ceae381a..fd999fe2 100644 --- a/qxmpp.pri +++ b/qxmpp.pri @@ -4,12 +4,18 @@ QT += network xml QXMPP_VERSION = 0.4.0 QXMPP_INCLUDEPATH = $$PWD/src/base $$PWD/src/client $$PWD/src/server +# Determine library name CONFIG(debug, debug|release) { QXMPP_LIBRARY_NAME = qxmpp_d } else { QXMPP_LIBRARY_NAME = qxmpp } +# Determine library type (lib or staticlib) +isEmpty(QXMPP_LIBRARY_TYPE) { + QXMPP_LIBRARY_TYPE = staticlib +} + # Libraries used internally by QXmpp android { @@ -25,24 +31,19 @@ android { } # Libraries for apps which use QXmpp -symbian { +QXMPP_LIBS = -l$${QXMPP_LIBRARY_NAME} +contains(QXMPP_LIBRARY_TYPE,staticlib) { # Symbian needs a .lib extension to recognise the library as static - QXMPP_LIBS = -l$${QXMPP_LIBRARY_NAME}.lib -} else { - QXMPP_LIBS = -l$${QXMPP_LIBRARY_NAME} -} + symbian: QXMPP_LIBS = -l$${QXMPP_LIBRARY_NAME}.lib -# Determine library type (lib or staticlib) -isEmpty(QXMPP_LIBRARY_TYPE) { - QXMPP_LIBRARY_TYPE = staticlib -} -contains(QXMPP_LIBRARY_TYPE,staticlib) { # FIXME: we should be able to use the link_prl option to automatically pull # in the extra libraries which the qxmpp library needs, but this does not # seem to work on win32, so we specify the dependencies here: QXMPP_LIBS += $$QXMPP_INTERNAL_LIBS DEFINES += QXMPP_STATIC } else { + # Windows needs the major library version + win32: QXMPP_LIBS = -l$${QXMPP_LIBRARY_NAME}0 DEFINES += QXMPP_SHARED } -- cgit v1.2.3