Fix static linking when bearer management plugins are built, part 2
After commit 5f160a3699
moved the code
that's shared across all bearer management plugins into QtNetwork, there
is one piece of code remaining that's shared across the connman and the
networkmanager bearer plugin: The dbus ofono interface code. To avoid
linking that twice (and causing duplicate symbol errors), this patch
moves it into a static platform support library. This way for shared
builds the code is included twice, but for static builds only once.
Change-Id: Idf5414bc22fea45f11c600f28eaea91bb4dc6308
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
parent
6e3b5801d2
commit
7a605edc22
15
src/platformsupport/linuxofono/linuxofono.pro
Normal file
15
src/platformsupport/linuxofono/linuxofono.pro
Normal file
@ -0,0 +1,15 @@
|
||||
TARGET = QtLinuxOfonoSupport
|
||||
MODULE = linuxofono_support
|
||||
|
||||
QT = core dbus
|
||||
CONFIG += static internal_module
|
||||
|
||||
DEFINES += QT_NO_CAST_FROM_ASCII
|
||||
|
||||
HEADERS += \
|
||||
qofonoservice_linux_p.h
|
||||
|
||||
SOURCES += \
|
||||
qofonoservice_linux.cpp
|
||||
|
||||
load(qt_module)
|
@ -148,7 +148,7 @@ QOfonoModemInterface::QOfonoModemInterface(const QString &dbusPathName, QObject
|
||||
{
|
||||
QDBusConnection::systemBus().connect(QLatin1String(OFONO_SERVICE),
|
||||
path(),
|
||||
OFONO_MODEM_INTERFACE,
|
||||
QLatin1String(OFONO_MODEM_INTERFACE),
|
||||
QLatin1String("PropertyChanged"),
|
||||
this,SLOT(propertyChanged(QString,QDBusVariant)));
|
||||
}
|
@ -45,3 +45,7 @@ darwin {
|
||||
|
||||
qtConfig(vulkan): \
|
||||
SUBDIRS += vkconvenience
|
||||
|
||||
!android:linux*:qtHaveModule(dbus) \
|
||||
SUBDIRS += linuxofono
|
||||
|
||||
|
@ -1,14 +1,12 @@
|
||||
TARGET = qconnmanbearer
|
||||
|
||||
QT = core network-private dbus
|
||||
QT = core network-private dbus linuxofono_support_private
|
||||
|
||||
HEADERS += qconnmanservice_linux_p.h \
|
||||
../linux_common/qofonoservice_linux_p.h \
|
||||
qconnmanengine.h
|
||||
|
||||
SOURCES += main.cpp \
|
||||
qconnmanservice_linux.cpp \
|
||||
../linux_common/qofonoservice_linux.cpp \
|
||||
qconnmanengine.cpp
|
||||
|
||||
OTHER_FILES += connman.json
|
||||
|
@ -54,7 +54,7 @@
|
||||
#include <private/qbearerengine_impl_p.h>
|
||||
|
||||
#include "qconnmanservice_linux_p.h"
|
||||
#include "../linux_common/qofonoservice_linux_p.h"
|
||||
#include <private/qofonoservice_linux_p.h>
|
||||
|
||||
#include <QMap>
|
||||
#include <QVariant>
|
||||
|
@ -1,15 +1,13 @@
|
||||
TARGET = qnmbearer
|
||||
|
||||
QT = core network-private dbus
|
||||
QT = core network-private dbus linuxofono_support_private
|
||||
|
||||
HEADERS += qnetworkmanagerservice.h \
|
||||
qnetworkmanagerengine.h \
|
||||
../linux_common/qofonoservice_linux_p.h
|
||||
qnetworkmanagerengine.h
|
||||
|
||||
SOURCES += main.cpp \
|
||||
qnetworkmanagerservice.cpp \
|
||||
qnetworkmanagerengine.cpp \
|
||||
../linux_common/qofonoservice_linux.cpp
|
||||
qnetworkmanagerengine.cpp
|
||||
|
||||
OTHER_FILES += networkmanager.json
|
||||
|
||||
|
@ -53,7 +53,6 @@
|
||||
#include <QDBusInterface>
|
||||
#include <QDBusMessage>
|
||||
#include <QDBusReply>
|
||||
#include "../linux_common/qofonoservice_linux_p.h"
|
||||
|
||||
#ifndef QT_NO_DBUS
|
||||
|
||||
|
@ -55,7 +55,7 @@
|
||||
|
||||
#include "qnetworkmanagerservice.h"
|
||||
|
||||
#include "../linux_common/qofonoservice_linux_p.h"
|
||||
#include <private/qofonoservice_linux_p.h>
|
||||
|
||||
#include <QMap>
|
||||
#include <QVariant>
|
||||
|
@ -29,6 +29,7 @@
|
||||
"QtKmsSupport" => "$basedir/src/platformsupport/kmsconvenience",
|
||||
"QtEdidSupport" => "$basedir/src/platformsupport/edid",
|
||||
"QtVulkanSupport" => "$basedir/src/platformsupport/vkconvenience",
|
||||
"QtLinuxOfonoSupport" => "$basedir/src/platformsupport/linuxofono",
|
||||
"QtPlatformHeaders" => "$basedir/src/platformheaders",
|
||||
"QtANGLE/KHR" => "!$basedir/src/3rdparty/angle/include/KHR",
|
||||
"QtANGLE/GLES2" => "!$basedir/src/3rdparty/angle/include/GLES2",
|
||||
|
Loading…
Reference in New Issue
Block a user