mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +08:00
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:
committed by
Mat Sutcliffe
parent
0970dbdcfc
commit
d639187f91
@@ -1,12 +1,16 @@
|
||||
load(common_pre)
|
||||
|
||||
QT += core dbus network
|
||||
QT += core dbus network widgets
|
||||
|
||||
TARGET = simulatorfscommon
|
||||
TEMPLATE = lib
|
||||
|
||||
CONFIG += staticlib
|
||||
CONFIG += blackconfig blackmisc
|
||||
CONFIG += blackconfig blackmisc blackcore blackgui
|
||||
CONFIG += simulatorplugincommon fsuipc
|
||||
|
||||
contains(BLACK_CONFIG, Static) {
|
||||
CONFIG += staticlib
|
||||
}
|
||||
|
||||
DEPENDPATH += . $$SourceRoot/src
|
||||
INCLUDEPATH += . $$SourceRoot/src
|
||||
@@ -14,8 +18,7 @@ INCLUDEPATH += . $$SourceRoot/src
|
||||
SOURCES += *.cpp
|
||||
HEADERS += *.h
|
||||
|
||||
LIBS *= -lsimulatorplugincommon
|
||||
addStaticLibraryDependency(simulatorplugincommon)
|
||||
DEFINES += BUILD_FSCOMMON_LIB
|
||||
|
||||
swiftConfig(sims.fsuipc) {
|
||||
equals(WORD_SIZE,32) {
|
||||
@@ -27,5 +30,9 @@ swiftConfig(sims.fsuipc) {
|
||||
}
|
||||
|
||||
DESTDIR = $$DestRoot/lib
|
||||
DLLDESTDIR = $$DestRoot/bin
|
||||
|
||||
dlltarget.path = $$PREFIX/bin
|
||||
INSTALLS += dlltarget
|
||||
|
||||
load(common_post)
|
||||
|
||||
32
src/plugins/simulator/fscommon/fscommonexport.h
Normal file
32
src/plugins/simulator/fscommon/fscommonexport.h
Normal 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_FSCOMMON_SIMULATORFSCOMMON_MACROS_H
|
||||
#define BLACKSIMPLUGIN_FSCOMMON_SIMULATORFSCOMMON_MACROS_H
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
/*!
|
||||
* \def FSCOMMON_EXPORT
|
||||
* FSCommon Export Macro
|
||||
*/
|
||||
|
||||
#ifndef WITH_STATIC
|
||||
# if defined(BUILD_FSCOMMON_LIB)
|
||||
# define FSCOMMON_EXPORT Q_DECL_EXPORT
|
||||
# else
|
||||
# define FSCOMMON_EXPORT Q_DECL_IMPORT
|
||||
# endif
|
||||
#else
|
||||
# define FSCOMMON_EXPORT
|
||||
#endif
|
||||
|
||||
#endif // guard
|
||||
@@ -12,6 +12,7 @@
|
||||
#ifndef BLACKSIMPLUGIN_FSUIPC_H
|
||||
#define BLACKSIMPLUGIN_FSUIPC_H
|
||||
|
||||
#include "plugins/simulator/fscommon/fscommonexport.h"
|
||||
#include "blackmisc/simulation/simulatedaircraft.h"
|
||||
#include "blackmisc/weather/weathergrid.h"
|
||||
#include <QStringList>
|
||||
@@ -21,7 +22,7 @@ namespace BlackSimPlugin
|
||||
namespace FsCommon
|
||||
{
|
||||
//! Class representing a FSUIPC "interface"
|
||||
class CFsuipc : public QObject
|
||||
class FSCOMMON_EXPORT CFsuipc : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
#ifndef BLACKSIMPLUGIN_FSCOMMON_SIMULATORFSCOMMON_H
|
||||
#define BLACKSIMPLUGIN_FSCOMMON_SIMULATORFSCOMMON_H
|
||||
|
||||
#include "../plugincommon/simulatorplugincommon.h"
|
||||
#include "plugins/simulator/fscommon/fsuipc.h"
|
||||
#include "plugins/simulator/plugincommon/simulatorplugincommon.h"
|
||||
#include "blackmisc/simulation/interpolator.h"
|
||||
#include "blackmisc/simulation/fscommon/aircraftcfgparser.h"
|
||||
#include "fsuipc.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <memory>
|
||||
@@ -25,7 +25,7 @@ namespace BlackSimPlugin
|
||||
namespace FsCommon
|
||||
{
|
||||
//! Common base class for MS flight simulators
|
||||
class CSimulatorFsCommon : public Common::CSimulatorPluginCommon
|
||||
class FSCOMMON_EXPORT CSimulatorFsCommon : public Common::CSimulatorPluginCommon
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(BlackCore::ISimulator)
|
||||
|
||||
Reference in New Issue
Block a user