Commit 68461c3c authored by pixhawk's avatar pixhawk

Unified dev branches, enabled building of QGroundControl without OSG

parent 6f583e02
......@@ -38,8 +38,7 @@ release {
macx {
HARDWARE_PLATFORM = $$system(uname -a)
contains( HARDWARE_PLATFORM, 9.6.0 ) || contains( HARDWARE_PLATFORM, 9.7.0 ) || contains( HARDWARE_PLATFORM, 9.8.0 ) || || contains( HARDWARE_PLATFORM, 9.9.0 )
{
contains( HARDWARE_PLATFORM, 9.6.0 ) || contains( HARDWARE_PLATFORM, 9.7.0 ) || contains( HARDWARE_PLATFORM, 9.8.0 ) || || contains( HARDWARE_PLATFORM, 9.9.0 ) {
# x86 Mac OS X Leopard 10.5 and earlier
CONFIG += x86 cocoa phonon
message(Building for Mac OS X 32bit/Leopard 10.5 and earlier)
......@@ -71,10 +70,24 @@ macx {
-lm
ICON = $$BASEDIR/images/icons/macx.icns
# Copy audio files if needed
QMAKE_PRE_LINK += cp -r $$BASEDIR/audio $$DESTDIR/qgroundcontrol.app/Contents/MacOs/.
exists(/opt/local/lib/osg):exists("/opt/local/lib/osgEarth") {
message("Building support for OSGEARTH")
LIBS += -L/opt/local/lib/
INCLUDEPATH += /opt/local/include
# Include OpenSceneGraph and osgEarth libraries
LIBS += -losg \
-losgViewer \
-losgEarth
DEFINES += QGC_OSG_ENABLED
}
}
# GNU/Linux
linux-g++ {
linux-g++-32 {
CONFIG += debug
......@@ -113,6 +126,15 @@ linux-g++ {
-lSDL \
-lSDLmain
exists(/usr/lib/osg):exists(/usr/lib/osgEarth) {
message("Building support for OSGEARTH")
# Include OpenSceneGraph and osgEarth libraries
LIBS += -losg \
-losgViewer \
-losgEarth
DEFINES += QGC_OSG_ENABLED
}
QMAKE_CXXFLAGS += -Wl,-E
#-lflite_cmu_us_rms \
......@@ -156,6 +178,15 @@ linux-g++-64 {
-lflite \
-lSDL \
-lSDLmain
exists(/usr/lib/osg):exists(/usr/lib/osgEarth) {
message("Building support for OSGEARTH")
# Include OpenSceneGraph and osgEarth libraries
LIBS += -losg \
-losgViewer \
-losgEarth
DEFINES += QGC_OSG_ENABLED
}
}
......@@ -185,6 +216,11 @@ win32 {
}
RC_FILE = $$BASEDIR/qgroundcontrol.rc
# Copy dependencies
QMAKE_PRE_LINK += copy /Y $$BASEDIR/lib/sdl/SDL.dll $$BUILDDIR/debug/ & copy /Y $$BASEDIR/lib/sdl/SDL.dll $$BUILDDIR/release/
QMAKE_PRE_LINK += copy /Y $$BASEDIR/lib/sdl/SDL.dll $$BUILDDIR/debug/ & copy /Y $$BASEDIR/lib/sdl/SDL.dll $$BUILDDIR/release/
QMAKE_PRE_LINK += copy /Y audio $$BUILDDIR\debug\
}
# Windows (64bit)
......@@ -213,5 +249,10 @@ win64 {
}
RC_FILE = $$BASEDIR/qgroundcontrol.rc
# Copy dependencies
QMAKE_PRE_LINK += copy /Y $$BASEDIR/lib/sdl/SDL.dll $$BUILDDIR/debug/ & copy /Y $$BASEDIR/lib/sdl/SDL.dll $$BUILDDIR/release/
QMAKE_PRE_LINK += copy /Y $$BASEDIR/lib/sdl/SDL.dll $$BUILDDIR/debug/ & copy /Y $$BASEDIR/lib/sdl/SDL.dll $$BUILDDIR/release/
QMAKE_PRE_LINK += copy /Y audio $$BUILDDIR\debug\
}
......@@ -33,8 +33,8 @@ QT += network \
phonon
TEMPLATE = app
TARGET = qgroundcontrol
BASEDIR = .
BUILDDIR = build
BASEDIR = $$IN_PWD
BUILDDIR = $$OUT_PWD/build
LANGUAGE = C++
CONFIG += debug_and_release \
console
......@@ -42,9 +42,17 @@ OBJECTS_DIR = $$BUILDDIR/obj
MOC_DIR = $$BUILDDIR/moc
UI_HEADERS_DIR = src/ui/generated
MAVLINK_CONF = ""
# If the user config file exists, it will be included.
# if the variable MAVLINK_CONF contains the name of an
# additional project, QGroundControl includes the support
# of custom MAVLink messages of this project
exists(user_config.pri) {
message("----- USING USER QGROUNDCONTROL CONFIG FROM user_config.pri -----")
include(user_config.pri)
message("----- USING CUSTOM USER QGROUNDCONTROL CONFIG FROM user_config.pri -----")
message("Adding support for additional MAVLink messages for: " $$MAVLINK_CONF)
message("------------------------------------------------------------------------")
}
INCLUDEPATH += $$BASEDIR/../mavlink/include/common
contains(MAVLINK_CONF, pixhawk) {
......@@ -71,11 +79,14 @@ contains(MAVLINK_CONF, ualberta) {
INCLUDEPATH += $$BASEDIR/../mavlink/include/ualberta
DEFINES += QGC_USE_UALBERTA_MESSAGES
}
contains(MAVLINK_CONF, ardupilotmega) {
# Remove the default set - it is included anyway
INCLUDEPATH -= $$BASEDIR/../mavlink/include/common
# Include OpenSceneGraph and osgEarth libraries
LIBS += -losg \
-losgViewer \
-losgEarth
# UALBERTA SPECIAL MESSAGES
INCLUDEPATH += $$BASEDIR/../mavlink/include/ardupilotmega
DEFINES += QGC_USE_ARDUPILOTMEGA_MESSAGES
}
# }
# Include general settings for MAVGround
......@@ -218,12 +229,18 @@ HEADERS += src/MG.h \
src/ui/RadioCalibration/SwitchCalibrator.h \
src/ui/RadioCalibration/CurveCalibrator.h \
src/ui/RadioCalibration/AbstractCalibrator.h \
src/ui/map3D/Q3DWidget.h \
src/comm/QGCMAVLink.h
contains(DEPENDENCIES_PRESENT, osgearth) {
message("Including headers for OSGEARTH")
# Enable only if OpenSceneGraph is available
HEADERS += src/ui/map3D/Q3DWidget.h \
src/ui/map3D/PixhawkCheetahGeode.h \
src/comm/QGCMAVLink.h \
src/ui/map3D/Pixhawk3DWidget.h \
src/ui/map3D/Q3DWidgetFactory.h \
src/ui/map3D/GCManipulator.h
}
SOURCES += src/main.cc \
src/Core.cc \
src/uas/UASManager.cc \
......@@ -294,12 +311,17 @@ SOURCES += src/main.cc \
src/ui/RadioCalibration/AbstractCalibrator.cc \
src/ui/RadioCalibration/RadioCalibrationData.cc \
#src/ui/WaypointGlobalView.cc \
src/ui/map3D/Q3DWidget.cc \
contains(DEPENDENCIES_PRESENT, osgearth) {
message("Including sources for OSGEARTH")
# Enable only if OpenSceneGraph is available
SOURCES += src/ui/map3D/Q3DWidget.cc \
src/ui/map3D/PixhawkCheetahGeode.cc \
src/ui/map3D/Pixhawk3DWidget.cc \
src/ui/map3D/Q3DWidgetFactory.cc \
src/ui/map3D/GCManipulator.cc
RESOURCES = mavground.qrc
}
RESOURCES += mavground.qrc
# Include RT-LAB Library
win32:exists(src/lib/opalrt/OpalApi.h):exists(C:\OPAL-RT\RT-LAB7.2.4\Common\bin) {
......
......@@ -45,8 +45,8 @@ This file is part of the QGROUNDCONTROL project
#include <ualberta.h>
#endif
#ifdef QGC_USE_ARDUPILOT_MESSAGES
#include <ardupilot.h>
#ifdef QGC_USE_ARDUPILOTMEGA_MESSAGES
#include <ardupilotmega.h>
#endif
......
......@@ -45,7 +45,10 @@ This file is part of the QGROUNDCONTROL project
#include "MainWindow.h"
#include "JoystickWidget.h"
#include "GAudioOutput.h"
#ifdef QGC_OSG_ENABLED
#include "Q3DWidgetFactory.h"
#endif
// FIXME Move
#include "PxQuadMAV.h"
......@@ -132,7 +135,9 @@ void MainWindow::buildWidgets()
mapWidget = new MapWidget(this);
protocolWidget = new XMLCommProtocolWidget(this);
dataplotWidget = new QGCDataPlot2D(this);
#ifdef QGC_OSG_ENABLED
_3DWidget = Q3DWidgetFactory::get("PIXHAWK");
#endif
// Dock widgets
controlDockWidget = new QDockWidget(tr("Control"), this);
......@@ -224,7 +229,9 @@ void MainWindow::arrangeCenterStack()
if (linechartWidget) centerStack->addWidget(linechartWidget);
if (protocolWidget) centerStack->addWidget(protocolWidget);
if (mapWidget) centerStack->addWidget(mapWidget);
#ifdef QGC_OSG_ENABLED
if (_3DWidget) centerStack->addWidget(_3DWidget);
#endif
if (hudWidget) centerStack->addWidget(hudWidget);
if (dataplotWidget) centerStack->addWidget(dataplotWidget);
......@@ -664,6 +671,7 @@ void MainWindow::loadPixhawkView()
clearView();
// Engineer view, used in EMAV2009
#ifdef QGC_OSG_ENABLED
// 3D map
if (_3DWidget)
{
......@@ -674,6 +682,7 @@ void MainWindow::loadPixhawkView()
centerStack->setCurrentWidget(_3DWidget);
}
}
#endif
// UAS CONTROL
if (controlDockWidget)
......@@ -952,6 +961,7 @@ void MainWindow::loadGlobalOperatorView()
void MainWindow::load3DView()
{
#ifdef QGC_OSG_ENABLED
clearView();
// 3D map
......@@ -997,8 +1007,9 @@ void MainWindow::load3DView()
hsiDockWidget->show();
}
}
#endif
this->show();
}
void MainWindow::loadEngineerView()
......
......@@ -63,7 +63,9 @@ This file is part of the QGROUNDCONTROL project
#include "HSIDisplay.h"
#include "QGCDataPlot2D.h"
#include "QGCRemoteControlView.h"
#ifdef QGC_OSG_ENABLED
#include "Q3DWidget.h"
#endif
#include "LogCompressor.h"
......@@ -163,7 +165,9 @@ protected:
QPointer<MapWidget> mapWidget;
QPointer<XMLCommProtocolWidget> protocolWidget;
QPointer<QGCDataPlot2D> dataplotWidget;
#ifdef QGC_OSG_ENABLED
QPointer<Q3DWidget> _3DWidget;
#endif
// Dock widgets
QPointer<QDockWidget> controlDockWidget;
QPointer<QDockWidget> infoDockWidget;
......
......@@ -34,6 +34,7 @@ This file is part of the QGROUNDCONTROL project
#include <QtOpenGL>
#include <osg/LineSegment>
#include <osg/PositionAttitudeTransform>
#include <osgGA/TrackballManipulator>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment