Commit 1fcd3922 authored by Bryant's avatar Bryant

Modified building OpenSceneGraph.

Added documentation and clarified messages to the user.
parent 5add42bc
......@@ -156,11 +156,11 @@ contains(DEFINES, ENABLE_MAVGEN) {
}
#
# OpenSceneGraph
# [OPTIONAL] OpenSceneGraph
#
MacBuild {
# GLUT and OpenSceneGraph are part of standard install on Mac
message("Including support for OpenSceneGraph")
CONFIG += OSGDependency
INCLUDEPATH += \
......@@ -169,23 +169,23 @@ MacBuild {
LIBS += \
-L$$BASEDIR/libs/lib/mac64/lib \
-losgWidget
}
LinuxBuild {
} else:LinuxBuild {
exists(/usr/include/osg) | exists(/usr/local/include/osg) {
message("Including support for OpenSceneGraph")
CONFIG += OSGDependency
exists(/usr/include/osg/osgQt) | exists(/usr/include/osgQt) | exists(/usr/local/include/osg/osgQt) | exists(/usr/local/include/osgQt) {
message("Including support for Linux OpenSceneGraph Qt")
LIBS += -losgQt
DEFINES += QGC_OSG_QT_ENABLED
} else {
message("Skipping support for Linux OpenSceneGraph Qt")
warning("Skipping support for Linux OpenSceneGraph Qt (missing libraries, see README)")
}
} else {
warning("Skipping support for OpenSceneGraph (missing libraries, see README)")
}
}
WindowsBuild {
} else:WindowsBuild {
exists($$BASEDIR/libs/lib/osg123) {
message("Including support for OpenSceneGraph")
CONFIG += OSGDependency
INCLUDEPATH += \
......@@ -193,12 +193,14 @@ WindowsBuild {
$$BASEDIR/libs/lib/osgEarth_3rdparty/win32/OpenSceneGraph-2.8.2/include
LIBS += -L$$BASEDIR/libs/lib/osgEarth_3rdparty/win32/OpenSceneGraph-2.8.2/lib
} else {
warning("Skipping support for OpenSceneGraph (missing libraries, see README)")
}
} else {
message("Skipping support for OpenSceneGraph (unsupported platform)")
}
OSGDependency {
message("Including support for OpenSceneGraph")
DEFINES += QGC_OSG_ENABLED
LIBS += \
......@@ -256,24 +258,26 @@ OSGDependency {
src/ui/map3D/WaypointGroupNode.cc \
src/ui/map3D/TerrainParamDialog.cc \
src/ui/map3D/ImageryParamDialog.cc
} else {
message("Skipping support for OpenSceneGraph")
}
#
# Google Earth
# [OPTIONAL] Google Earth dependency. Provides Google Earth view to supplement 2D map view.
# Only supported on Mac and Windows where Google Earth can be installed.
#
MacBuild | WindowsBuild {
message(Including support for Google Earth)
contains(DEFINES, DISABLE_GOOGLE_EARTH) {
message("Skipping support for Google Earth view (manual override)")
} else:MacBuild {
message("Including support for Google Earth view")
HEADERS += src/ui/map3D/QGCGoogleEarthView.h
SOURCES += src/ui/map3D/QGCGoogleEarthView.cc
} else:WindowsBuild {
message("Including support for Google Earth view")
HEADERS += src/ui/map3D/QGCGoogleEarthView.h
SOURCES += src/ui/map3D/QGCGoogleEarthView.cc
WindowsBuild {
CONFIG += qaxcontainer
}
CONFIG += qaxcontainer
} else {
message(Skipping support for Google Earth)
message("Skipping support for Google Earth view (unsupported platform)")
}
#
......
......@@ -45,6 +45,11 @@ This is not built by default as it is deprecated functionality that will removed
### Speech syntehsis
QGroundcontrol can notify the controller of information via speech synthesis on the Mac and Linux platforms. This requires the `flite` library on Linux while on Mac text-to-speech support is built in starting with OS 10.6+ (Snow Leopard). This support is enabled by default on all platforms if the dependencies are met. Disabling this functionality can be done by adding the `DISABLE_SPEECH` define when running `qmake` like: `qmake DEFINES=DISABLE_SPEECH`. Note that multiple defines can be specified like this: `qmake DEFINES="DISABLE_QUPGRADE DISABLE_SPEECH"`.
### 3D view
The OpenSceneGraph libraries provide 3D rendering to the map overlays that QGC can provide.
OpenSceneGraph support is built-in to Mac OS X. On Linux it is commonly available through the libopenscenegraph and libopenscenegraph-qt developer packages. Windows support does not currently exist. This functionality with be automatically built if the proper libraries are installed.
### XBee support
QGroundControl can talk to XBee wireless devices using their proprietary protocol directly on Windows and Linux platforms. This support is not necessary if you're not using XBee devices or aren't using their proprietary protocol. On Windows, the necessary dependencies are included in this repository and no additional steps are required. For Linux, change to the `libs/thirdParty/libxbee` folder and run `make;sudo make install` to install libxbee on your system (uninstalling can be done with a `sudo make uninstall`). qmake will automatically detect the library on Linux, so no other work is necessary.
......
......@@ -679,11 +679,11 @@ void MainWindow::buildCommonWidgets()
}
#endif
#if (defined _MSC_VER) /*| (defined Q_OS_MAC) mac os doesn't support gearth right now */
#ifndef DISABLE_GOOGLE_EARTH
if (!earthWidget)
{
earthWidget = new QGCGoogleEarthView(this);
addToCentralStackedWidget(earthWidget,VIEW_GOOGLEEARTH, tr("Google Earth"));
addToCentralStackedWidget(earthWidget, VIEW_GOOGLEEARTH, tr("Google Earth"));
}
#endif
}
......
......@@ -61,7 +61,7 @@ This file is part of the QGROUNDCONTROL project
#include "HSIDisplay.h"
#include "QGCRemoteControlView.h"
#include "opmapcontrol.h"
#if (defined Q_OS_MAC) | (defined _MSC_VER)
#ifndef DISABLE_GOOGLE_EARTH
#include "QGCGoogleEarthView.h"
#endif
#include "QGCToolBar.h"
......@@ -416,8 +416,8 @@ protected:
#ifdef QGC_OSG_ENABLED
QPointer<QWidget> q3DWidget;
#endif
#if (defined _MSC_VER) || (defined Q_OS_MAC)
QPointer<QGCGoogleEarthView> earthWidget;
#ifndef DISABLE_GOOGLE_EARTH
QPointer<QGCGoogleEarthView> earthWidget;
#endif
QPointer<QGCFirmwareUpdate> firmwareUpdateWidget;
......
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