aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2010-09-17 16:10:09 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2010-09-17 16:10:09 +0000
commit189d3340259b27659be7cc3ee9617c8e26ef133b (patch)
treeb075cb33738f630b5142ca2b855fd53fd21db6e5
parenta89d8a1b6f1ce28b1cde7149cc1ede8128b74e31 (diff)
downloadqxmpp-189d3340259b27659be7cc3ee9617c8e26ef133b.tar.gz
rework link flags
-rw-r--r--qxmpp.pri23
-rw-r--r--src/src.pro10
2 files changed, 15 insertions, 18 deletions
diff --git a/qxmpp.pri b/qxmpp.pri
index a016738a..fee4a0a6 100644
--- a/qxmpp.pri
+++ b/qxmpp.pri
@@ -9,19 +9,24 @@ CONFIG(debug, debug|release) {
QXMPP_LIBRARY_NAME = qxmpp
}
-QXMPP_LIBS = -L$$QXMPP_LIBRARY_DIR -l$${QXMPP_LIBRARY_NAME}
+# Libraries used internal by QXmpp
+symbian {
+ unset(QXMPP_INTERNAL_LIBS)
+} else:unix {
+ QXMPP_INTERNAL_LIBS = -lresolv
+} else:win32 {
+ QXMPP_INTERNAL_LIBS = -ldnsapi
+}
-# Symbian needs a .lib extension to recognise the library as static
+# Libraries for apps which use QXmpp
symbian {
- QXMPP_LIBS = -L$$QXMPP_LIBRARY_DIR -l$${QXMPP_LIBRARY_NAME}.lib
+ # Symbian needs a .lib extension to recognise the library as static
+ QXMPP_LIBS = -L$$QXMPP_LIBRARY_DIR -l$${QXMPP_LIBRARY_NAME}.lib
+} else {
+ QXMPP_LIBS = -L$$QXMPP_LIBRARY_DIR -l$${QXMPP_LIBRARY_NAME}
}
# 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:
-unix {
- QXMPP_LIBS += -lresolv
-}
-win32 {
- QXMPP_LIBS += -ldnsapi
-}
+QXMPP_LIBS += $$QXMPP_INTERNAL_LIBS
diff --git a/src/src.pro b/src/src.pro
index 8d012799..7319203c 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -3,8 +3,8 @@ include(../qxmpp.pri)
TEMPLATE = lib
QT += network xml
-
CONFIG += staticlib
+LIBS += $$QXMPP_INTERNAL_LIBS
# To disable the dependency on QtGui, uncomment the following:
# DEFINES += QXMPP_NO_GUI
@@ -14,14 +14,6 @@ CONFIG += staticlib
# DEFINES += QXMPP_USE_SPEEX
# LIBS += -lspeex
-# DNS support
-unix {
- LIBS += -lresolv
-}
-win32 {
- LIBS += -ldnsapi
-}
-
# Target definition
TARGET = $$QXMPP_LIBRARY_NAME
VERSION = $$QXMPP_VERSION