diff --git a/src/xbus/xbus.map b/src/xbus/xbus.map new file mode 100644 index 000000000..cfb84ec80 --- /dev/null +++ b/src/xbus/xbus.map @@ -0,0 +1,10 @@ +{ + global: + XPluginStart; + XPluginStop; + XPluginEnable; + XPluginDisable; + XPluginReceiveMessage; + local: + *; +}; diff --git a/src/xbus/xbus.pro b/src/xbus/xbus.pro index 59cd10607..f39337d70 100644 --- a/src/xbus/xbus.pro +++ b/src/xbus/xbus.pro @@ -5,13 +5,17 @@ QT += core gui widgets dbus network TEMPLATE = lib -CONFIG += shared +CONFIG += shared plugin CONFIG += blackmisc blackcore win32 { equals(WORD_SIZE,64): LIBS += -lXPLM_64 equals(WORD_SIZE,32): LIBS += -lXPLM } +unix { + # Flags needed because there is no XPLM link library + QMAKE_LFLAGS += -shared -rdynamic -nodefaultlibs -undefined_warning -Wl,--version-script=$$PWD/xbus.map +} DEPENDPATH += . ../../src INCLUDEPATH += . ../../src @@ -65,13 +69,17 @@ linux:TARGET = lin macx:TARGET = mac macx { # a single dylib file contains both 32bit and 64bit binaries - DESTDIR = ../../xbus + XBUS_DESTDIR = ../../xbus } else { - equals(WORD_SIZE,64): DESTDIR = ../../xbus/64 - equals(WORD_SIZE,32): DESTDIR = ../../xbus + equals(WORD_SIZE,64): XBUS_DESTDIR = ../../xbus/64 + equals(WORD_SIZE,32): XBUS_DESTDIR = ../../xbus } +# QMake's Makefile generator ignores TARGET_EXT +unix: QMAKE_POST_LINK += cp $$DESTDIR/lib$${TARGET}.so $$XBUS_DESTDIR/$${TARGET}.xpl +else: DESTDIR = $$XBUS_DESTDIR + include (../../libraries.pri) # TODO refactor .pri files into common_pre.pri and common_post.pri