mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 10:15:38 +08:00
refs #282 changes to get xbus to compile on OSX
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "menus.h"
|
||||
#include <type_traits>
|
||||
#include <cassert>
|
||||
#include <string>
|
||||
|
||||
namespace XBus
|
||||
{
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <XPLM/XPLMUtilities.h>
|
||||
#include <QDateTime>
|
||||
#include <cstring>
|
||||
#include <cmath>
|
||||
|
||||
namespace XBus
|
||||
{
|
||||
|
||||
@@ -12,7 +12,11 @@ win32 {
|
||||
equals(WORD_SIZE,64): LIBS += -lXPLM_64
|
||||
equals(WORD_SIZE,32): LIBS += -lXPLM
|
||||
}
|
||||
unix {
|
||||
else:macx {
|
||||
LIBS += -framework XPLM -framework Cocoa -framework CoreFoundation
|
||||
DEFINES += XUTILS_EXCLUDE_MAC_CRAP=1
|
||||
}
|
||||
else:unix {
|
||||
# Flags needed because there is no XPLM link library
|
||||
QMAKE_LFLAGS += -shared -rdynamic -nodefaultlibs -undefined_warning -Wl,--version-script=$$PWD/xbus.map
|
||||
}
|
||||
@@ -76,9 +80,10 @@ else {
|
||||
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
|
||||
# QMake ignores TARGET_EXT on Unix
|
||||
macx: QMAKE_POST_LINK += mkdir -p $${XBUS_DESTDIR} && cp $$OUT_PWD/lib$${TARGET}.dylib $$XBUS_DESTDIR/$${TARGET}.xpl
|
||||
else:unix: QMAKE_POST_LINK += mkdir -p $${XBUS_DESTDIR} && cp $$OUT_PWD/lib$${TARGET}.so $$XBUS_DESTDIR/$${TARGET}.xpl
|
||||
else: DESTDIR = $$XBUS_DESTDIR
|
||||
|
||||
include (../../libraries.pri)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user