1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

GCS - Made the GCS compile without OSG support

This commit is contained in:
PT_Dreamer 2012-07-30 16:11:36 +01:00
parent d8c2bb3292
commit b15091fead
2 changed files with 16 additions and 6 deletions

View File

@ -3,31 +3,39 @@ TARGET = PfdQml
QT += svg
QT += opengl
QT += declarative
#DEFINES += USE_OSG
include(../../openpilotgcsplugin.pri)
include(../../plugins/coreplugin/coreplugin.pri)
include(pfdqml_dependencies.pri)
contains(DEFINES,USE_OSG){
LIBS += -losg -losgUtil -losgViewer -losgQt -losgDB -lOpenThreads -losgGA
LIBS += -losgEarth -losgEarthFeatures -losgEarthUtil
}
HEADERS += \
pfdqmlplugin.h \
pfdqmlgadget.h \
pfdqmlgadgetwidget.h \
pfdqmlgadgetfactory.h \
pfdqmlgadgetconfiguration.h \
pfdqmlgadgetoptionspage.h \
pfdqmlgadgetoptionspage.h
contains(DEFINES,USE_OSG){
\
osgearth.h
}
SOURCES += \
pfdqmlplugin.cpp \
pfdqmlgadget.cpp \
pfdqmlgadgetfactory.cpp \
pfdqmlgadgetwidget.cpp \
pfdqmlgadgetconfiguration.cpp \
pfdqmlgadgetoptionspage.cpp \
pfdqmlgadgetoptionspage.cpp
contains(DEFINES,USE_OSG){
\
osgearth.cpp
}
OTHER_FILES += PfdQml.pluginspec

View File

@ -19,8 +19,9 @@
#include "uavobjectmanager.h"
#include "uavobject.h"
#include "utils/svgimageprovider.h"
#ifdef USE_OSG
#include "osgearth.h"
#endif
#include <QDebug>
#include <QSvgRenderer>
#include <QtOpenGL/QGLWidget>
@ -66,8 +67,9 @@ PfdQmlGadgetWidget::PfdQmlGadgetWidget(QWidget *parent) :
//to expose settings values
engine()->rootContext()->setContextProperty("qmlWidget", this);
#ifdef USE_OSG
qmlRegisterType<OsgEarthItem>("org.OpenPilot", 1, 0, "OsgEarth");
#endif
}
PfdQmlGadgetWidget::~PfdQmlGadgetWidget()