mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
OP-1103 Fix for build error on OSX 10.8 after Qt5.1.1 update
This commit is contained in:
parent
d2355c665d
commit
0833cd206c
1
.gitignore
vendored
1
.gitignore
vendored
@ -25,6 +25,7 @@ GTAGS
|
||||
openpilotgcs-build-desktop
|
||||
|
||||
# Ignore some of the .pro.user files
|
||||
*.pro.user
|
||||
/ground/openpilotgcs/openpilotgcs.pro.user
|
||||
/ground/uavobjgenerator/uavobjgenerator.pro.user
|
||||
/ground/uavobjects/uavobjects.pro.user
|
||||
|
@ -30,6 +30,8 @@
|
||||
# qt-creator users. Top level Makefile handles all dependencies itself
|
||||
# and does not use ground.pro.
|
||||
|
||||
cache()
|
||||
|
||||
message("Make sure you have shadow build path set as noted in ground.pro. Build will fail otherwise")
|
||||
|
||||
TEMPLATE = subdirs
|
||||
|
@ -8,6 +8,14 @@ contains(QT_VERSION, ^4\\.[0-7]\\..*) {
|
||||
message("Cannot build OpenPilot GCS with Qt version $${QT_VERSION}.")
|
||||
error("Cannot build OpenPilot GCS with Qt version $${QT_VERSION}. Use at least Qt 4.8!")
|
||||
}
|
||||
cache()
|
||||
macx {
|
||||
# This ensures that code is compiled with the /usr/bin version of gcc instead
|
||||
# of the gcc in XCode.app/Context/Development
|
||||
QMAKE_CC = /usr/bin/gcc
|
||||
QMAKE_CXX = /usr/bin/g++
|
||||
QMAKE_LINK = /usr/bin/g++
|
||||
}
|
||||
|
||||
include(openpilotgcs.pri)
|
||||
|
||||
|
@ -12,8 +12,11 @@ defineReplace(prependAll) {
|
||||
}
|
||||
|
||||
XMLPATTERNS = $$targetPath($$[QT_INSTALL_BINS]/xmlpatterns)
|
||||
LUPDATE = $$targetPath($$[QT_INSTALL_BINS]/lupdate) -locations relative -no-ui-lines -no-sort -noobsolete
|
||||
LUPDATE = $$targetPath($$[QT_INSTALL_BINS]/lupdate) -locations relative -no-ui-lines -no-sort
|
||||
LRELEASE = $$targetPath($$[QT_INSTALL_BINS]/lrelease)
|
||||
LCONVERT = $$targetPath($$[QT_INSTALL_BINS]/lconvert)
|
||||
|
||||
wd = $$replace(GCS_SOURCE_TREE, /, $$QMAKE_DIR_SEP)
|
||||
|
||||
TRANSLATIONS = $$prependAll(LANGUAGES, $$PWD/openpilotgcs_,.ts)
|
||||
|
||||
@ -34,7 +37,7 @@ QMAKE_EXTRA_TARGETS += ts
|
||||
|
||||
TEMPLATE = app
|
||||
TARGET = phony_target2
|
||||
CONFIG -= qt
|
||||
CONFIG -= qt sdk separate_debug_info gdb_dwarf_index
|
||||
QT =
|
||||
LIBS =
|
||||
|
||||
|
@ -21,6 +21,16 @@
|
||||
TEMPLATE = lib
|
||||
TARGET = sdlgamepad
|
||||
DEFINES += SDLGAMEPAD_LIBRARY
|
||||
macx {
|
||||
# Workaround to ensure that SDL framework and associated header files are found
|
||||
INCLUDEPATH += /Library/Frameworks/SDL.framework/Headers
|
||||
SDL = -F/Library/Frameworks
|
||||
# Add SDL to CFLAGS fixes build problems on mac
|
||||
QMAKE_CFLAGS += $$SDL
|
||||
QMAKE_CXXFLAGS += $$SDL
|
||||
# Let the linker know where to find the frameworks
|
||||
LIBS += $$SDL
|
||||
}
|
||||
|
||||
include(../../openpilotgcslibrary.pri)
|
||||
|
||||
@ -28,7 +38,7 @@ SOURCES += sdlgamepad.cpp
|
||||
HEADERS += sdlgamepad.h \
|
||||
sdlgamepad_global.h
|
||||
|
||||
macx:LIBS += -framework SDL
|
||||
macx:LIBS += -framework OpenGL -framework SDL -framework Cocoa
|
||||
!macx:LIBS += -lSDL
|
||||
|
||||
OTHER_FILES += COPYING \
|
||||
|
@ -9,6 +9,18 @@ include(../../plugins/coreplugin/coreplugin.pri)
|
||||
include(../../plugins/uavobjects/uavobjects.pri)
|
||||
include(../../libs/sdlgamepad/sdlgamepad.pri)
|
||||
|
||||
macx {
|
||||
# Ensures that SDL framework and header files are found when compiled with Qt5.1.1
|
||||
INCLUDEPATH += /Library/Frameworks/SDL.framework/Headers
|
||||
SDL = -F/Library/Frameworks
|
||||
# Add SDL to CFLAGS fixes build problems on mac
|
||||
QMAKE_CFLAGS += $$SDL
|
||||
QMAKE_CXXFLAGS += $$SDL
|
||||
# Let the linker know where to find the frameworks
|
||||
LIBS += $$SDL
|
||||
}
|
||||
|
||||
|
||||
HEADERS += gcscontrolgadget.h \
|
||||
gcscontrolgadgetconfiguration.h \
|
||||
gcscontrolgadgetoptionspage.h
|
||||
|
@ -4,6 +4,7 @@ include(../../openpilotgcsplugin.pri)
|
||||
include(../../plugins/coreplugin/coreplugin.pri)
|
||||
include(../../libs/glc_lib/glc_lib.pri)
|
||||
include(modelview_dependencies.pri)
|
||||
|
||||
INCLUDEPATH += ../../libs/glc_lib
|
||||
HEADERS += modelviewplugin.h \
|
||||
modelviewgadgetconfiguration.h \
|
||||
|
@ -26,6 +26,7 @@
|
||||
*/
|
||||
#include "QtDebug"
|
||||
|
||||
#include "OpenGL/OpenGL.h"
|
||||
#include "modelviewgadgetwidget.h"
|
||||
#include "extensionsystem/pluginmanager.h"
|
||||
#include "glc_context.h"
|
||||
|
@ -29,7 +29,7 @@
|
||||
#define OPHID_CONST_H
|
||||
#include "QtDebug"
|
||||
|
||||
#define printf qDebug
|
||||
//#define printf qDebug
|
||||
#define OPHID_DEBUG_ON 1
|
||||
#ifdef OPHID_DEBUG_ON
|
||||
#define OPHID_DEBUG(fmt, args ...) qDebug("[DEBUG] "fmt,##args)
|
||||
|
@ -34,14 +34,14 @@ win32 {
|
||||
macx {
|
||||
SOURCES += src/ophid_usbmon_mac.cpp \
|
||||
hidapi/mac/hid.c
|
||||
SDK = /Developer/SDKs/MacOSX10.5.sdk
|
||||
SDK = /Developer/SDKs/MacOSX10.8.sdk
|
||||
ARCH = -mmacosx-version-min=10.5 \
|
||||
-arch ppc \
|
||||
-arch i386
|
||||
LIBS += $(ARCH) \
|
||||
-Wl,-syslibroot,$(SDK) \
|
||||
-framework IOKit \
|
||||
-framework CoreFoundation
|
||||
-framework CoreFoundation \
|
||||
-framework IOKit
|
||||
}
|
||||
|
||||
linux-g++ {
|
||||
|
Loading…
x
Reference in New Issue
Block a user