refs #282 changes to get xbus to compile on OSX

This commit is contained in:
Mathew Sutcliffe
2014-07-01 23:01:28 +01:00
parent c00324ef12
commit 1e89771de0
4 changed files with 13 additions and 6 deletions

View File

@@ -44,6 +44,6 @@ linux-g++* {
equals(WORD_SIZE,32): LIBS *= -L$$EXTERNALDIR/linux32/lib equals(WORD_SIZE,32): LIBS *= -L$$EXTERNALDIR/linux32/lib
} }
macx-clang { macx-clang {
equals(WORD_SIZE,64): LIBS *= -L$$EXTERNALDIR/macx-clang64/lib equals(WORD_SIZE,64): LIBS *= -L$$EXTERNALDIR/macx-clang64/lib -F$$EXTERNALDIR/macx-clang64/lib
equals(WORD_SIZE,32): LIBS *= -L$$EXTERNALDIR/macx-clang32/lib equals(WORD_SIZE,32): LIBS *= -L$$EXTERNALDIR/macx-clang32/lib -F$$EXTERNALDIR/macx-clang32/lib
} }

View File

@@ -6,6 +6,7 @@
#include "menus.h" #include "menus.h"
#include <type_traits> #include <type_traits>
#include <cassert> #include <cassert>
#include <string>
namespace XBus namespace XBus
{ {

View File

@@ -10,6 +10,7 @@
#include <XPLM/XPLMUtilities.h> #include <XPLM/XPLMUtilities.h>
#include <QDateTime> #include <QDateTime>
#include <cstring> #include <cstring>
#include <cmath>
namespace XBus namespace XBus
{ {

View File

@@ -12,7 +12,11 @@ win32 {
equals(WORD_SIZE,64): LIBS += -lXPLM_64 equals(WORD_SIZE,64): LIBS += -lXPLM_64
equals(WORD_SIZE,32): LIBS += -lXPLM 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 # Flags needed because there is no XPLM link library
QMAKE_LFLAGS += -shared -rdynamic -nodefaultlibs -undefined_warning -Wl,--version-script=$$PWD/xbus.map 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 equals(WORD_SIZE,32): XBUS_DESTDIR = ../../xbus
} }
# QMake's Makefile generator ignores TARGET_EXT # QMake ignores TARGET_EXT on Unix
unix: QMAKE_POST_LINK += cp $$DESTDIR/lib$${TARGET}.so $$XBUS_DESTDIR/$${TARGET}.xpl macx: QMAKE_POST_LINK += mkdir -p $${XBUS_DESTDIR} && cp $$OUT_PWD/lib$${TARGET}.dylib $$XBUS_DESTDIR/$${TARGET}.xpl
else: DESTDIR = $$XBUS_DESTDIR 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) include (../../libraries.pri)