Convert static common simulator plugins to shared ones

Test Plan:
- Check that the new shared libraries are packaged in all platform installers.
- check that plugins are loaded properly on all platforms.

Reviewers: #swift_pilot_client, msutcliffe

Reviewed By: #swift_pilot_client, msutcliffe

Maniphest Tasks: T471

Differential Revision: https://dev.swift-project.org/D79
This commit is contained in:
Roland Rossgotterer
2018-12-17 15:59:14 +01:00
committed by Mat Sutcliffe
parent 0970dbdcfc
commit d639187f91
28 changed files with 194 additions and 63 deletions

View File

@@ -5,14 +5,25 @@ QT += core dbus xml network widgets
TARGET = simulatorplugincommon
TEMPLATE = lib
CONFIG += staticlib
CONFIG += blackconfig blackmisc blackgui
CONFIG += blackconfig blackmisc blackcore blackgui
DEPENDPATH += . $$SourceRoot/src
INCLUDEPATH += . $$SourceRoot/src
DEFINES += BUILD_SIMULATORPLUGINCOMMON_LIB
SOURCES += *.cpp
HEADERS += *.h
DESTDIR = $$DestRoot/lib
DLLDESTDIR = $$DestRoot/bin
win32 {
dlltarget.path = $$PREFIX/bin
INSTALLS += dlltarget
} else {
target.path = $$PREFIX/lib
INSTALLS += target
}
load(common_post)

View File

@@ -12,6 +12,7 @@
#ifndef BLACKSIMPLUGIN_COMMON_SIMULATORPLUGINCOMMON_H
#define BLACKSIMPLUGIN_COMMON_SIMULATORPLUGINCOMMON_H
#include "plugins/simulator/plugincommon/simulatorplugincommonexport.h"
#include "blackcore/simulator.h"
#include <QObject>
#include <QPointer>
@@ -22,7 +23,7 @@ namespace BlackSimPlugin
namespace Common
{
//! Common base class for simulator plugins
class CSimulatorPluginCommon : public BlackCore::ISimulator
class SIMULATORPLUGINCOMMON_EXPORT CSimulatorPluginCommon : public BlackCore::ISimulator
{
Q_OBJECT
Q_INTERFACES(BlackCore::ISimulator)

View File

@@ -0,0 +1,32 @@
/* Copyright (C) 2018
* swift project Community / Contributors
*
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
* including this file, may be copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE file.
*/
//! \file
#ifndef BLACKSIMPLUGIN_SIMULATORPLUGINCOMMON_MACROS_H
#define BLACKSIMPLUGIN_SIMULATORPLUGINCOMMON_MACROS_H
#include <QtGlobal>
/*!
* \def SIMULATORPLUGINCOMMON_EXPORT
* SimulatorPluginCommon Export Macro
*/
#ifndef WITH_STATIC
# if defined(BUILD_SIMULATORPLUGINCOMMON_LIB)
# define SIMULATORPLUGINCOMMON_EXPORT Q_DECL_EXPORT
# else
# define SIMULATORPLUGINCOMMON_EXPORT Q_DECL_IMPORT
# endif
#else
# define SIMULATORPLUGINCOMMON_EXPORT
#endif
#endif // guard