summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKari Oikarinen <kari.oikarinen@qt.io>2017-02-13 12:30:08 +0200
committerKari Oikarinen <kari.oikarinen@qt.io>2017-03-10 14:16:22 +0000
commite27267a9e344019dc2bc61951ad9f0285c62b3b3 (patch)
tree6309376eb792e55da03f6eb77903215408353f91
parentf44fc5178bc417e93ec1b2e400dd6dea2d82982b (diff)
Make libqdb a static library
Previously it was a shared library, but the symbols were not exported properly, which meant that trying to use them lead to linker failures when using MSVC. This was previously worked around by including the files a second time, so remove those workarounds. Change-Id: Ieafd066c5a3924573cd5e6e397a0e544a35564b3 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
-rw-r--r--libqdb/libqdb.pro4
-rw-r--r--libqdb/libqdb_global.h32
-rw-r--r--libqdb/protocol/qdbtransport.h1
-rw-r--r--qdb/qdb.pro24
-rw-r--r--qdbd/qdbd.pro1
-rw-r--r--tests/servicetest.pro22
-rw-r--r--tests/streamtest.pro15
-rw-r--r--tests/tst_qdbmessage.pro2
-rw-r--r--tests/tst_stream.pro43
9 files changed, 25 insertions, 119 deletions
diff --git a/libqdb/libqdb.pro b/libqdb/libqdb.pro
index 650ec61..a14ffb2 100644
--- a/libqdb/libqdb.pro
+++ b/libqdb/libqdb.pro
@@ -2,8 +2,7 @@ QT -= gui
TARGET = qdb
TEMPLATE = lib
-
-DEFINES += LIBQDB_LIBRARY
+CONFIG += staticlib
SOURCES += \
abstractconnection.cpp \
@@ -16,7 +15,6 @@ SOURCES += \
HEADERS += \
abstractconnection.h \
interruptsignalhandler.h \
- libqdb_global.h \
protocol/protocol.h \
protocol/qdbmessage.h \
protocol/qdbtransport.h \
diff --git a/libqdb/libqdb_global.h b/libqdb/libqdb_global.h
deleted file mode 100644
index 86e9393..0000000
--- a/libqdb/libqdb_global.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/******************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Debug Bridge.
-**
-** $QT_BEGIN_LICENSE:COMM$
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** $QT_END_LICENSE$
-**
-******************************************************************************/
-#ifndef LIBQDB_GLOBAL_H
-#define LIBQDB_GLOBAL_H
-
-#include <QtCore/qglobal.h>
-
-#if defined(LIBQDB_LIBRARY)
-# define LIBQDBSHARED_EXPORT Q_DECL_EXPORT
-#else
-# define LIBQDBSHARED_EXPORT Q_DECL_IMPORT
-#endif
-
-#endif // LIBQDB_GLOBAL_H
diff --git a/libqdb/protocol/qdbtransport.h b/libqdb/protocol/qdbtransport.h
index d98e1ae..8b1de92 100644
--- a/libqdb/protocol/qdbtransport.h
+++ b/libqdb/protocol/qdbtransport.h
@@ -30,7 +30,6 @@ QT_END_NAMESPACE
#include <memory>
-
class QdbTransport : public QObject
{
Q_OBJECT
diff --git a/qdb/qdb.pro b/qdb/qdb.pro
index d94825c..43744c8 100644
--- a/qdb/qdb.pro
+++ b/qdb/qdb.pro
@@ -55,33 +55,15 @@ INCLUDEPATH += $$PWD/../
unix {
LIBS += -L$$OUT_PWD/../libqdb -lqdb
- QMAKE_RPATHDIR += ../libqdb
target.path = $$[QT_INSTALL_BINS]
INSTALLS += target
}
win32 {
CONFIG(debug, debug|release) {
- LIBQDBDIR = $$OUT_PWD/../libqdb/debug
+ LIBS += -L$$OUT_PWD/../libqdb/debug
} else {
- LIBQDBDIR = $$OUT_PWD/../libqdb/release
+ LIBS += -L$$OUT_PWD/../libqdb/release
}
-
- LIBS += -L$$LIBQDBDIR -lqdb
-
- SOURCES += \
- $$PWD/../libqdb/protocol/qdbmessage.cpp \
- $$PWD/../libqdb/protocol/qdbtransport.cpp \
- $$PWD/../libqdb/stream.cpp \
- $$PWD/../libqdb/streampacket.cpp \
- $$PWD/../libqdb/abstractconnection.cpp \
- $$PWD/../libqdb/interruptsignalhandler.cpp
-
- HEADERS += \
- $$PWD/../libqdb/protocol/qdbmessage.h \
- $$PWD/../libqdb/protocol/qdbtransport.h \
- $$PWD/../libqdb/stream.h \
- $$PWD/../libqdb/streampacket.h \
- $$PWD/../libqdb/abstractconnection.h \
- $$PWD/../libqdb/interruptsignalhandler.h
+ LIBS += -lqdb
}
diff --git a/qdbd/qdbd.pro b/qdbd/qdbd.pro
index 520ecf8..9295c0d 100644
--- a/qdbd/qdbd.pro
+++ b/qdbd/qdbd.pro
@@ -37,7 +37,6 @@ HEADERS += \
INCLUDEPATH += $$PWD/../
LIBS += -L$$OUT_PWD/../libqdb -lqdb
-QMAKE_RPATHDIR += ../libqdb
unix {
target.path = $$[QT_INSTALL_BINS]
diff --git a/tests/servicetest.pro b/tests/servicetest.pro
index 8b59f79..fd7d2c5 100644
--- a/tests/servicetest.pro
+++ b/tests/servicetest.pro
@@ -33,29 +33,13 @@ INCLUDEPATH += $$PWD/../
unix {
LIBS += -L$$OUT_PWD/../libqdb -lqdb
- QMAKE_RPATHDIR += ../libqdb
}
win32 {
- HEADERS += \
- ../libqdb/protocol/protocol.h \
- ../libqdb/protocol/qdbmessage.h \
- ../libqdb/protocol/qdbtransport.h \
- ../libqdb/stream.h \
- ../libqdb/abstractconnection.h \
- ../libqdb/streampacket.h
-
- SOURCES += \
- ../libqdb/protocol/qdbmessage.cpp \
- ../libqdb/protocol/qdbtransport.cpp \
- ../libqdb/stream.cpp \
- ../libqdb/abstractconnection.cpp \
- ../libqdb/streampacket.cpp
-
CONFIG(debug, debug|release) {
- LIBQDBDIR = $$OUT_PWD/../libqdb/debug
+ LIBS += -L$$OUT_PWD/../libqdb/debug
} else {
- LIBQDBDIR = $$OUT_PWD/../libqdb/release
+ LIBS += -L$$OUT_PWD/../libqdb/release
}
- LIBS += -L$$LIBQDBDIR -lqdb
+ LIBS += -lqdb
}
diff --git a/tests/streamtest.pro b/tests/streamtest.pro
index 793d4e9..b7f1f08 100644
--- a/tests/streamtest.pro
+++ b/tests/streamtest.pro
@@ -27,22 +27,13 @@ INCLUDEPATH += $$PWD/../
unix {
LIBS += -L$$OUT_PWD/../libqdb -lqdb
- QMAKE_RPATHDIR += ../libqdb
}
win32 {
- HEADERS += \
- ../libqdb/protocol/qdbmessage.h \
- ../libqdb/protocol/qdbtransport.h
-
- SOURCES += \
- ../libqdb/protocol/qdbmessage.cpp \
- ../libqdb/protocol/qdbtransport.cpp
-
CONFIG(debug, debug|release) {
- LIBQDBDIR = $$OUT_PWD/../libqdb/debug
+ LIBS += -L$$OUT_PWD/../libqdb/debug
} else {
- LIBQDBDIR = $$OUT_PWD/../libqdb/release
+ LIBS += -L$$OUT_PWD/../libqdb/release
}
- LIBS += -L$$LIBQDBDIR -lqdb
+ LIBS += -lqdb
}
diff --git a/tests/tst_qdbmessage.pro b/tests/tst_qdbmessage.pro
index 180f616..735ba96 100644
--- a/tests/tst_qdbmessage.pro
+++ b/tests/tst_qdbmessage.pro
@@ -17,3 +17,5 @@ HEADERS += \
SOURCES += \
tst_qdbmessage.cpp \
../libqdb/protocol/qdbmessage.cpp
+
+INCLUDEPATH += $$PWD/..
diff --git a/tests/tst_stream.pro b/tests/tst_stream.pro
index b78ad71..f9bcb39 100644
--- a/tests/tst_stream.pro
+++ b/tests/tst_stream.pro
@@ -9,37 +9,20 @@ CONFIG -= app_bundle
TEMPLATE = app
+HEADERS += \
+ ../libqdb/abstractconnection.h \
+ ../libqdb/stream.h \
+ ../libqdb/streampacket.h \
+ ../libqdb/protocol/protocol.h \
+ ../libqdb/protocol/qdbmessage.h \
+ ../libqdb/protocol/qdbtransport.h \
+
SOURCES += \
+ ../libqdb/abstractconnection.cpp \
+ ../libqdb/stream.cpp \
+ ../libqdb/streampacket.cpp \
+ ../libqdb/protocol/qdbmessage.cpp \
+ ../libqdb/protocol/qdbtransport.cpp \
tst_stream.cpp \
INCLUDEPATH += $$PWD/../
-
-unix {
- LIBS += -L$$OUT_PWD/../libqdb -lqdb
- QMAKE_RPATHDIR += ../libqdb
-}
-
-win32 {
- HEADERS += \
- ../libqdb/protocol/qdbmessage.h \
- ../libqdb/protocol/qdbtransport.h \
- ../libqdb/stream.h \
- ../libqdb/abstractconnection.h \
- ../libqdb/streampacket.h
-
- SOURCES += \
- ../libqdb/protocol/qdbmessage.cpp \
- ../libqdb/protocol/qdbtransport.cpp \
- ../libqdb/stream.cpp \
- ../libqdb/abstractconnection.cpp \
- ../libqdb/streampacket.cpp
-
- CONFIG(debug, debug|release) {
- LIBQDBDIR = $$OUT_PWD/../libqdb/debug
- } else {
- LIBQDBDIR = $$OUT_PWD/../libqdb/release
- }
-
- LIBS += -L$$LIBQDBDIR -lqdb
-}
-