Commit 34c2c3d9 authored by Don Gagne's avatar Don Gagne

Restructured project files

Made them more understandable for what is needed and for why. Removed
duplication and made sure builds used common settings across all OS
flavors. Removed mingw support for Windows since it was only partially
implemented.
parent bc99cb6a
#
# Tell the Linux build to look in a few additional places for libs
#
LinuxBuild {
INCLUDEPATH += \
/usr/include \
/usr/local/include
LIBS += \
-L/usr/lib
linux-g++-64 {
LIBS += \
-L/usr/local/lib64 \
-L/usr/lib64
}
}
#
# Add in a few missing headers to windows
#
WindowsBuild {
INCLUDEPATH += libs/lib/msinttypes
}
#
# QUpgrade
#
exists(qupgrade) {
message(Including support for QUpgrade)
DEFINES += QUPGRADE_SUPPORT
INCLUDEPATH += qupgrade/src/apps/qupgrade
FORMS += \
qupgrade/src/apps/qupgrade/dialog_bare.ui \
qupgrade/src/apps/qupgrade/boardwidget.ui
HEADERS += \
qupgrade/src/apps/qupgrade/qgcfirmwareupgradeworker.h \
qupgrade/src/apps/qupgrade/uploader.h \
qupgrade/src/apps/qupgrade/dialog_bare.h \
qupgrade/src/apps/qupgrade/boardwidget.h
SOURCES += \
qupgrade/src/apps/qupgrade/qgcfirmwareupgradeworker.cpp \
qupgrade/src/apps/qupgrade/uploader.cpp \
qupgrade/src/apps/qupgrade/dialog_bare.cpp \
qupgrade/src/apps/qupgrade/boardwidget.cpp
RESOURCES += \
qupgrade/qupgrade.qrc
LinuxBuild:CONFIG += qesp_linux_udev
include(qupgrade/libs/qextserialport/src/qextserialport.pri)
} else {
message(Skipping support for QUpgrade)
}
#
# MAVLink
#
MAVLINK_CONF = ""
MAVLINKPATH = $$BASEDIR/libs/mavlink/include/mavlink/v1.0
DEFINES += MAVLINK_NO_DATA
# 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. It will also
# create a QGC_USE_{AUTOPILOT_NAME}_MESSAGES macro for use
# within the actual code.
exists(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("------------------------------------------------------------------------")
} else {
MAVLINK_CONF += ardupilotmega
}
INCLUDEPATH += $$MAVLINKPATH
isEmpty(MAVLINK_CONF) {
INCLUDEPATH += $$MAVLINKPATH/common
} else {
INCLUDEPATH += $$MAVLINKPATH/$$MAVLINK_CONF
DEFINES += $$sprintf('QGC_USE_%1_MESSAGES', $$upper($$MAVLINK_CONF))
}
#
# MAVLink generator (deprecated)
#
DEPENDPATH += \
src/apps/mavlinkgen
INCLUDEPATH += \
src/apps/mavlinkgen \
src/apps/mavlinkgen/ui \
src/apps/mavlinkgen/generator
include(src/apps/mavlinkgen/mavlinkgen.pri)
#
# OpenSceneGraph
#
MacBuild {
# GLUT and OpenSceneGraph are part of standard install on Mac
CONFIG += OSGDependency
INCLUDEPATH += \
$$BASEDIR/libs/lib/mac64/include
LIBS += \
-L$$BASEDIR/libs/lib/mac64/lib \
-losgWidget
}
LinuxBuild {
exists(/usr/include/osg) | exists(/usr/local/include/osg) {
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")
}
}
}
WindowsBuild {
exists($$BASEDIR/libs/lib/osg123) {
CONFIG += OSGDependency
INCLUDEPATH += \
$$BASEDIR/libs/lib/osgEarth/win32/include \
$$BASEDIR/libs/lib/osgEarth_3rdparty/win32/OpenSceneGraph-2.8.2/include
LIBS += -L$$BASEDIR/libs/lib/osgEarth_3rdparty/win32/OpenSceneGraph-2.8.2/lib
}
}
OSGDependency {
message("Including support for OpenSceneGraph")
DEFINES += QGC_OSG_ENABLED
LIBS += \
-losg \
-losgViewer \
-losgGA \
-losgDB \
-losgText \
-lOpenThreads
HEADERS += \
src/ui/map3D/gpl.h \
src/ui/map3D/CameraParams.h \
src/ui/map3D/ViewParamWidget.h \
src/ui/map3D/SystemContainer.h \
src/ui/map3D/SystemViewParams.h \
src/ui/map3D/GlobalViewParams.h \
src/ui/map3D/SystemGroupNode.h \
src/ui/map3D/Q3DWidget.h \
src/ui/map3D/GCManipulator.h \
src/ui/map3D/ImageWindowGeode.h \
src/ui/map3D/PixhawkCheetahNode.h \
src/ui/map3D/Pixhawk3DWidget.h \
src/ui/map3D/Q3DWidgetFactory.h \
src/ui/map3D/WebImageCache.h \
src/ui/map3D/WebImage.h \
src/ui/map3D/TextureCache.h \
src/ui/map3D/Texture.h \
src/ui/map3D/Imagery.h \
src/ui/map3D/HUDScaleGeode.h \
src/ui/map3D/WaypointGroupNode.h \
src/ui/map3D/TerrainParamDialog.h \
src/ui/map3D/ImageryParamDialog.h
SOURCES += \
src/ui/map3D/gpl.cc \
src/ui/map3D/CameraParams.cc \
src/ui/map3D/ViewParamWidget.cc \
src/ui/map3D/SystemContainer.cc \
src/ui/map3D/SystemViewParams.cc \
src/ui/map3D/GlobalViewParams.cc \
src/ui/map3D/SystemGroupNode.cc \
src/ui/map3D/Q3DWidget.cc \
src/ui/map3D/ImageWindowGeode.cc \
src/ui/map3D/GCManipulator.cc \
src/ui/map3D/PixhawkCheetahNode.cc \
src/ui/map3D/Pixhawk3DWidget.cc \
src/ui/map3D/Q3DWidgetFactory.cc \
src/ui/map3D/WebImageCache.cc \
src/ui/map3D/WebImage.cc \
src/ui/map3D/TextureCache.cc \
src/ui/map3D/Texture.cc \
src/ui/map3D/Imagery.cc \
src/ui/map3D/HUDScaleGeode.cc \
src/ui/map3D/WaypointGroupNode.cc \
src/ui/map3D/TerrainParamDialog.cc \
src/ui/map3D/ImageryParamDialog.cc
} else {
message("Skipping support for OpenSceneGraph")
}
#
# Google Earth
#
MacBuild | WindowsBuild {
message(Including support for Google Earth)
HEADERS += src/ui/map3D/QGCGoogleEarthView.h
SOURCES += src/ui/map3D/QGCGoogleEarthView.cc
WindowsBuild {
CONFIG += qaxcontainer
}
} else {
message(Skipping support for Google Earth)
}
#
# Protcol Buffers for PixHawk
#
LinuxBuild : contains(MAVLINK_CONF, pixhawk) {
exists(/usr/local/include/google/protobuf) | exists(/usr/include/google/protobuf) {
message("Including support for Protocol Buffers")
DEFINES += QGC_PROTOBUF_ENABLED
LIBS += \
-lprotobuf \
-lprotobuf-lite \
-lprotoc
HEADERS += \
libs/mavlink/include/mavlink/v1.0/pixhawk/pixhawk.pb.h \
src/ui/map3D/ObstacleGroupNode.h \
src/ui/map3D/GLOverlayGeode.h
SOURCES += \
libs/mavlink/share/mavlink/src/v1.0/pixhawk/pixhawk.pb.cc \
src/ui/map3D/ObstacleGroupNode.cc \
src/ui/map3D/GLOverlayGeode.cc
} else {
message("Skipping support for Protocol Buffers")
}
} else {
message("Skipping support for Protocol Buffers")
}
#
# libfreenect Kinect support
#
MacBuild | LinuxBuild {
exists(/opt/local/include/libfreenect) | exists(/usr/local/include/libfreenect) {
message("Including support for libfreenect")
#INCLUDEPATH += /usr/include/libusb-1.0
DEFINES += QGC_LIBFREENECT_ENABLED
LIBS += -lfreenect
HEADERS += src/input/Freenect.h
SOURCES += src/input/Freenect.cc
} else {
message("Skipping support for libfreenect")
}
} else {
message("Skipping support for libfreenect")
}
#
# EIGEN matrix library (NOMINMAX needed to make internal min/max work)
#
INCLUDEPATH += libs/eigen
DEFINES += NOMINMAX
#
# OPMapControl library (from OpenPilot)
#
include(libs/utils/utils_external.pri)
include(libs/opmapcontrol/opmapcontrol_external.pri)
DEPENDPATH += \
libs/utils \
libs/utils/src \
libs/opmapcontrol \
libs/opmapcontrol/src \
libs/opmapcontrol/src/mapwidget
INCLUDEPATH += \
libs/utils \
libs \
libs/opmapcontrol
#
# QWT plotting library
#
include(libs/qwt/qwt.pri)
#
# QSerialPort - serial port library
#
include(libs/serialport/qserialport.pri)
WindowsBuild {
# Used to enumerate serial ports by QSerialPort
LIBS += -lsetupapi
}
#
# XBee wireless
#
WindowsBuild | LinuxBuild {
message(Including support for XBee)
DEFINES += XBEELINK
INCLUDEPATH += libs/thirdParty/libxbee
HEADERS += \
src/comm/XbeeLinkInterface.h \
src/comm/XbeeLink.h \
src/comm/HexSpinBox.h \
src/ui/XbeeConfigurationWindow.h \
src/comm/CallConv.h
SOURCES += \
src/comm/XbeeLink.cpp \
src/comm/HexSpinBox.cpp \
src/ui/XbeeConfigurationWindow.cpp
WindowsBuild {
LIBS += -llibs/thirdParty/libxbee/lib/libxbee
}
LinuxBuild {
LIBS += -lxbee
}
} else {
message(Skipping support for XBee)
}
#
# 3DConnexion 3d Mice support
#
LinuxBuild : exists(/usr/local/lib/libxdrvlib.so) {
message("Including support for Magellan 3DxWare")
DEFINES +=
MOUSE_ENABLED_LINUX \
ParameterCheck # Hack: Has to be defined for magellan usage
INCLUDEPATH *= /usr/local/include
HEADERS += src/input/Mouse6dofInput.h
SOURCES += src/input/Mouse6dofInput.cpp
LIBS += -L/usr/local/lib/ -lxdrvlib
}
WindowsBuild {
message("Including support for Magellan 3DxWare")
DEFINES += MOUSE_ENABLED_WIN
INCLUDEPATH += libs/thirdParty/3DMouse/win
HEADERS += \
libs/thirdParty/3DMouse/win/I3dMouseParams.h \
libs/thirdParty/3DMouse/win/MouseParameters.h \
libs/thirdParty/3DMouse/win/Mouse3DInput.h \
src/input/Mouse6dofInput.h
SOURCES += \
libs/thirdParty/3DMouse/win/MouseParameters.cpp \
libs/thirdParty/3DMouse/win/Mouse3DInput.cpp \
src/input/Mouse6dofInput.cpp
}
#
# Opal RT-LAB Library
#
WindowsBuild : win32 : exists(src/lib/opalrt/OpalApi.h) : exists(C:/OPAL-RT/RT-LAB7.2.4/Common/bin) {
message("Including support for Opal-RT")
DEFINES += OPAL_RT
INCLUDEPATH +=
src/lib/opalrt
libs/lib/opal/include \
FORMS += src/ui/OpalLinkSettings.ui
HEADERS += \
src/comm/OpalRT.h \
src/comm/OpalLink.h \
src/comm/Parameter.h \
src/comm/QGCParamID.h \
src/comm/ParameterList.h \
src/ui/OpalLinkConfigurationWindow.h
SOURCES += \
src/comm/OpalRT.cc \
src/comm/OpalLink.cc \
src/comm/Parameter.cc \
src/comm/QGCParamID.cc \
src/comm/ParameterList.cc \
src/ui/OpalLinkConfigurationWindow.cc
LIBS += \
-LC:/OPAL-RT/RT-LAB7.2.4/Common/bin \
-lOpalApi
} else {
message("Skipping support for Opal-RT")
}
#
# SDL
#
MacBuild {
INCLUDEPATH += \
$$BASEDIR/libs/lib/Frameworks/SDL.framework/Headers
LIBS += \
-F$$BASEDIR/libs/lib/Frameworks \
-framework SDL
}
LinuxBuild {
LIBS += \
-lSDL \
-lSDLmain
}
WindowsBuild {
INCLUDEPATH += \
$$BASEDIR/libs/lib/sdl/msvc/include \
LIBS += \
-L$$BASEDIR/libs/lib/sdl/msvc/lib \
-lSDLmain \
-lSDL
}
#
# Festival Lite speech synthesis engine
#
LinuxBuild {
LIBS += \
-lflite_cmu_us_kal \
-lflite_usenglish \
-lflite_cmulex \
-lflite
}
# -------------------------------------------------
# QGroundControl - Micro Air Vehicle Groundstation
# Please see our website at <http://qgroundcontrol.org>
# Maintainer:
# Lorenz Meier <lm@inf.ethz.ch>
# (c) 2009-2011 QGroundControl Developers
# This file is part of the open groundstation project
# QGroundControl is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# QGroundControl is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with QGroundControl. If not, see <http://www.gnu.org/licenses/>.
# -------------------------------------------------
QMAKE_POST_LINK += $$quote(echo "Copying files")
#
# Copy the application resources to the associated place alongside the application
#
COPY_RESOURCE_LIST = \
$$BASEDIR/files \
$$BASEDIR/qml \
$$BASEDIR/data
WindowsBuild {
DESTDIR_COPY_RESOURCE_LIST = $$replace(DESTDIR,"/","\\")
COPY_RESOURCE_LIST = $$replace(COPY_RESOURCE_LIST, "/","\\")
CONCATCMD = $$escape_expand(\\n)
}
LinuxBuild {
DESTDIR_COPY_RESOURCE_LIST = $$DESTDIR
CONCATCMD = &&
}
MacBuild {
DESTDIR_COPY_RESOURCE_LIST = $$DESTDIR/$${TARGET}.app/Contents/MacOS
CONCATCMD = &&
}
for(COPY_DIR, COPY_RESOURCE_LIST):QMAKE_POST_LINK += $$CONCATCMD $$QMAKE_COPY_DIR $${COPY_DIR} $$DESTDIR_COPY_RESOURCE_LIST
#
# Perform platform specific setup
#
MacBuild {
# Copy non-standard libraries and frameworks into app package
QMAKE_POST_LINK += && $$QMAKE_COPY_DIR $$BASEDIR/libs/lib/mac64/lib $$DESTDIR/$${TARGET}.app/Contents/libs
QMAKE_POST_LINK += && $$QMAKE_COPY_DIR -L $$BASEDIR/libs/lib/Frameworks $$DESTDIR/$${TARGET}.app/Contents/Frameworks
# Fix library paths inside executable
INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
INSTALL_NAME_LIB_LIST = \
libOpenThreads.dylib \
libosg.dylib \
libosgViewer.dylib \
libosgGA.dylib \
libosgDB.dylib \
libosgText.dylib \
libosgWidget.dylib
for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
}
# Fix library paths within libraries (inter-library dependencies)
# OSG GA LIBRARY
INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgGA.dylib
INSTALL_NAME_LIB_LIST = \
libOpenThreads.dylib \
libosg.dylib \
libosgGA.dylib \
libosgDB.dylib \
libosgUtil.dylib
for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
}
# OSG DB LIBRARY
INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgDB.dylib
INSTALL_NAME_LIB_LIST = \
libOpenThreads.dylib \
libosg.dylib \
libosgDB.dylib \
libosgUtil.dylib
for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
}
# OSG TEXT LIBRARY
INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgText.dylib
INSTALL_NAME_LIB_LIST = \
libOpenThreads.dylib \
libosg.dylib \
libosgDB.dylib \
libosgUtil.dylib \
libosgText.dylib
for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
}
# OSG UTIL LIBRARY
INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgUtil.dylib
INSTALL_NAME_LIB_LIST = \
libOpenThreads.dylib \
libosg.dylib
for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
}
# OSG VIEWER LIBRARY
INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgViewer.dylib
INSTALL_NAME_LIB_LIST = \
libOpenThreads.dylib \
libosg.dylib \
libosgGA.dylib \
libosgDB.dylib \
libosgUtil.dylib \
libosgText.dylib
for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
}
# OSG WIDGET LIBRARY
INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgWidget.dylib
INSTALL_NAME_LIB_LIST = \
libOpenThreads.dylib \
libosg.dylib \
libosgGA.dylib \
libosgDB.dylib \
libosgUtil.dylib \
libosgText.dylib \
libosgViewer.dylib
for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
}
# CORE OSG LIBRARY
QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$DESTDIR/$${TARGET}.app/Contents/libs/libosg.dylib
# SDL Framework
QMAKE_POST_LINK += && install_name_tool -change "@rpath/SDL.framework/Versions/A/SDL" "@executable_path/../Frameworks/SDL.framework/Versions/A/SDL" $$DESTDIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
}
WindowsBuild {
# Copy dependencies
BASEDIR_WIN = $$replace(BASEDIR,"/","\\")
DESTDIR_WIN = $$replace(DESTDIR,"/","\\")
DebugBuild {
COPY_FILE_DESTDIR = $$DESTDIR_WIN\\debug
}
ReleaseBuild {
COPY_FILE_DESTDIR = $$DESTDIR_WIN\\release
}
QMAKE_POST_LINK += $$escape_expand(\\n) $$quote($$QMAKE_COPY_DIR "$$(QTDIR)\\plugins" "$$DESTDIR_WIN\\debug")
COPY_FILE_LIST = \
$$BASEDIR_WIN\\libs\\lib\\sdl\\win32\\SDL.dll \
$$BASEDIR_WIN\\libs\\thirdParty\\libxbee\\lib\\libxbee.dll \
$$(QTDIR)\\bin\\phonond4.dll \
$$(QTDIR)\\bin\\QtCored4.dll \
$$(QTDIR)\\bin\\QtGuid4.dll \
$$(QTDIR)\\bin\\QtMultimediad4.dll \
$$(QTDIR)\\bin\\QtNetworkd4.dll \
$$(QTDIR)\\bin\\QtOpenGLd4.dll \
$$(QTDIR)\\bin\\QtSqld4.dll \
$$(QTDIR)\\bin\\QtSvgd4.dll \
$$(QTDIR)\\bin\\QtTestd4.dll \
$$(QTDIR)\\bin\\QtWebKitd4.dll \
$$(QTDIR)\\bin\\QtXmld4.dll \
$$(QTDIR)\\bin\\QtXmlPatternsd4.dll \
$$(QTDIR)\\bin\\QtDeclaratived4.dll \
$$(QTDIR)\\bin\\QtScriptd4.dll
for(COPY_FILE, COPY_FILE_LIST) {
QMAKE_POST_LINK += $$escape_expand(\\n) $$quote($$QMAKE_COPY "$$COPY_FILE" "$$COPY_FILE_DESTDIR")
}
ReleaseBuild {
QMAKE_POST_LINK += $$escape_expand(\\n) $$quote(del /F "$$DESTDIR_WIN\\release\\$${TARGET}.exp")
QMAKE_POST_LINK += $$escape_expand(\\n) $$quote(del /F "$$DESTDIR_WIN\\release\\$${TARGET}")
# Copy Visual Studio DLLs
# Note that this is only done for release because the debugging versions of these DLLs cannot be redistributed.
# I'm not certain of the path for VS2008, so this only works for VS2010.
win32-msvc2010 {
QMAKE_POST_LINK += $$escape_expand(\\n) $$quote(xcopy /D /Y "\"C:\\Program Files \(x86\)\\Microsoft Visual Studio 10.0\\VC\\redist\\x86\\Microsoft.VC100.CRT\\*.dll\"" "$$DESTDIR_WIN\\release\\")
}
}
}
\ No newline at end of file
# -------------------------------------------------
# QGroundControl - Micro Air Vehicle Groundstation
# Please see our website at <http://qgroundcontrol.org>
# Maintainer:
# Lorenz Meier <lm@inf.ethz.ch>
# (c) 2009-2011 QGroundControl Developers
# This file is part of the open groundstation project
# QGroundControl is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# QGroundControl is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with QGroundControl. If not, see <http://www.gnu.org/licenses/>.
# -------------------------------------------------
message(Qt version $$[QT_VERSION])
win32-msvc2008|win32-msvc2010|win32-msvc2012 {
QMAKE_POST_LINK += $$quote(echo "Copying files"$$escape_expand(\\n))
} else {
QMAKE_POST_LINK += $$quote(echo "Copying files")
}
# Turn off serial port warnings
DEFINES += _TTY_NOWARN_
# This is the list of application resources which must be copied to the build target location
# We create one list and use it in each build type so that the various build flavors don't
# get out of sync.
COPY_RESOURCE_LIST = \
$$BASEDIR/files \
$$BASEDIR/qml \
$$BASEDIR/data
# MAC OS X
macx|macx-g++42|macx-g++|macx-llvm: {
CONFIG += x86_64 cocoa phonon
CONFIG -= x86
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
INCLUDEPATH += $$BASEDIR/libs/lib/Frameworks/SDL.framework/Headers
LIBS += -framework IOKit \
-F$$BASEDIR/libs/lib/Frameworks \
-framework SDL \
-framework CoreFoundation \
-framework ApplicationServices \
-lm
ICON = $$BASEDIR/files/images/icons/macx.icns
# Copy application resources
for(COPY_DIR, COPY_RESOURCE_LIST):QMAKE_POST_LINK += && cp -rf $${COPY_DIR} $$TARGETDIR/$${TARGET}.app/Contents/MacOS
# Copy MAVLink
QMAKE_POST_LINK += && cp -rf $$BASEDIR/libs/mavlink $$TARGETDIR/$${TARGET}.app/Contents/MacOS
# Copy libraries
QMAKE_POST_LINK += && mkdir -p $$TARGETDIR/$${TARGET}.app/Contents/libs
QMAKE_POST_LINK += && cp -rf $$BASEDIR/libs/lib/mac64/lib/* $$TARGETDIR/$${TARGET}.app/Contents/libs
# Copy frameworks
QMAKE_POST_LINK += && mkdir -p $$TARGETDIR/$${TARGET}.app/Contents/Frameworks
QMAKE_POST_LINK += && cp -rf $$BASEDIR/libs/lib/Frameworks/* $$TARGETDIR/$${TARGET}.app/Contents/Frameworks
# Fix library paths inside executable
QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
QMAKE_POST_LINK += && install_name_tool -change libosg.dylib "@executable_path/../libs/libosg.dylib" $$TARGETDIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
QMAKE_POST_LINK += && install_name_tool -change libosgViewer.dylib "@executable_path/../libs/libosgViewer.dylib" $$TARGETDIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
QMAKE_POST_LINK += && install_name_tool -change libosgGA.dylib "@executable_path/../libs/libosgGA.dylib" $$TARGETDIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
QMAKE_POST_LINK += && install_name_tool -change libosgDB.dylib "@executable_path/../libs/libosgDB.dylib" $$TARGETDIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
QMAKE_POST_LINK += && install_name_tool -change libosgText.dylib "@executable_path/../libs/libosgText.dylib" $$TARGETDIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
QMAKE_POST_LINK += && install_name_tool -change libosgWidget.dylib "@executable_path/../libs/libosgWidget.dylib" $$TARGETDIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
# Fix library paths within libraries (inter-library dependencies)
# OSG GA LIBRARY
QMAKE_POST_LINK += && install_name_tool -change libosgGA.dylib "@executable_path/../libs/libosgGA.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgGA.dylib
QMAKE_POST_LINK += && install_name_tool -change libosgDB.dylib "@executable_path/../libs/libosgDB.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgGA.dylib
QMAKE_POST_LINK += && install_name_tool -change libosgUtil.dylib "@executable_path/../libs/libosgUtil.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgGA.dylib
QMAKE_POST_LINK += && install_name_tool -change libosg.dylib "@executable_path/../libs/libosg.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgGA.dylib
QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgGA.dylib
# OSG DB LIBRARY
QMAKE_POST_LINK += && install_name_tool -change libosgDB.dylib "@executable_path/../libs/libosgDB.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgDB.dylib
QMAKE_POST_LINK += && install_name_tool -change libosgUtil.dylib "@executable_path/../libs/libosgUtil.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgDB.dylib
QMAKE_POST_LINK += && install_name_tool -change libosg.dylib "@executable_path/../libs/libosg.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgDB.dylib
QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgDB.dylib
# OSG TEXT LIBRARY
QMAKE_POST_LINK += && install_name_tool -change libosgText.dylib "@executable_path/../libs/libosgText.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgText.dylib
QMAKE_POST_LINK += && install_name_tool -change libosgDB.dylib "@executable_path/../libs/libosgDB.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgText.dylib
QMAKE_POST_LINK += && install_name_tool -change libosgUtil.dylib "@executable_path/../libs/libosgUtil.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgText.dylib
QMAKE_POST_LINK += && install_name_tool -change libosg.dylib "@executable_path/../libs/libosg.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgText.dylib
QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgText.dylib
# OSG UTIL LIBRARY
QMAKE_POST_LINK += && install_name_tool -change libosg.dylib "@executable_path/../libs/libosg.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgUtil.dylib
QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgUtil.dylib
# OSG VIEWER LIBRARY
QMAKE_POST_LINK += && install_name_tool -change libosgGA.dylib "@executable_path/../libs/libosgGA.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgViewer.dylib
QMAKE_POST_LINK += && install_name_tool -change libosgText.dylib "@executable_path/../libs/libosgText.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgViewer.dylib
QMAKE_POST_LINK += && install_name_tool -change libosgDB.dylib "@executable_path/../libs/libosgDB.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgViewer.dylib
QMAKE_POST_LINK += && install_name_tool -change libosgUtil.dylib "@executable_path/../libs/libosgUtil.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgViewer.dylib
QMAKE_POST_LINK += && install_name_tool -change libosg.dylib "@executable_path/../libs/libosg.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgViewer.dylib
QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgViewer.dylib
# OSG WIDGET LIBRARY
QMAKE_POST_LINK += && install_name_tool -change libosgGA.dylib "@executable_path/../libs/libosgGA.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgWidget.dylib
QMAKE_POST_LINK += && install_name_tool -change libosgText.dylib "@executable_path/../libs/libosgText.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgWidget.dylib
QMAKE_POST_LINK += && install_name_tool -change libosgDB.dylib "@executable_path/../libs/libosgDB.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgWidget.dylib
QMAKE_POST_LINK += && install_name_tool -change libosgUtil.dylib "@executable_path/../libs/libosgUtil.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgWidget.dylib
QMAKE_POST_LINK += && install_name_tool -change libosg.dylib "@executable_path/../libs/libosg.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgWidget.dylib
QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgWidget.dylib
QMAKE_POST_LINK += && install_name_tool -change libosgViewer.dylib "@executable_path/../libs/libosgViewer.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosgWidget.dylib
# CORE OSG LIBRARY
QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/$${TARGET}.app/Contents/libs/libosg.dylib
# SDL Framework
QMAKE_POST_LINK += && install_name_tool -change "@rpath/SDL.framework/Versions/A/SDL" "@executable_path/../Frameworks/SDL.framework/Versions/A/SDL" $$TARGETDIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
# No check for GLUT.framework since it's a MAC default
message("Building support for OpenSceneGraph")
DEPENDENCIES_PRESENT += osg
DEFINES += QGC_OSG_ENABLED
# Include OpenSceneGraph libraries
INCLUDEPATH += -framework GLUT \
-framework Cocoa \
$$BASEDIR/libs/lib/mac64/include
LIBS += -framework GLUT \
-framework Cocoa \
-L$$BASEDIR/libs/lib/mac64/lib \
-L$$BASEDIR/libs/lib/mac32/lib \
-lOpenThreads \
-losg \
-losgViewer \
-losgGA \
-losgDB \
-losgText \
-losgWidget
#exists(/usr/local/include/google/protobuf) {
# message("Building support for Protocol Buffers")
# DEPENDENCIES_PRESENT += protobuf
# # Include Protocol Buffers libraries
# LIBS += -L/usr/local/lib \
# -lprotobuf \
# -lprotobuf-lite \
# -lprotoc
#
# DEFINES += QGC_PROTOBUF_ENABLED
#}
exists(/opt/local/include/libfreenect)|exists(/usr/local/include/libfreenect) {
message("Building support for libfreenect")
DEPENDENCIES_PRESENT += libfreenect
# Include libfreenect libraries
LIBS += -lfreenect
DEFINES += QGC_LIBFREENECT_ENABLED
}
}
# GNU/Linux
linux-g++|linux-g++-64{
CONFIG -= console
DEFINES += __STDC_LIMIT_MACROS
CONFIG(release, debug|release) {
DEFINES += QT_NO_DEBUG
}
INCLUDEPATH += /usr/include \
/usr/local/include \
/usr/include/qt4/phonon \
/usr/include/phonon
LIBS += \
-L/usr/lib \
-L/usr/local/lib64 \
-lm \
-lflite_cmu_us_kal \
-lflite_usenglish \
-lflite_cmulex \
-lflite \
-lSDL \
-lSDLmain \
-lasound
exists(/usr/include/osg) | exists(/usr/local/include/osg) {
message("Building support for OpenSceneGraph")
DEPENDENCIES_PRESENT += osg
# Include OpenSceneGraph libraries
LIBS += -losg \
-losgViewer \
-losgGA \
-losgDB \
-losgText \
-lOpenThreads
DEFINES += QGC_OSG_ENABLED
}
exists(/usr/include/osg/osgQt) | exists(/usr/include/osgQt) |
exists(/usr/local/include/osg/osgQt) | exists(/usr/local/include/osgQt) {
message("Building support for OpenSceneGraph Qt")
# Include OpenSceneGraph Qt libraries
LIBS += -losgQt
DEFINES += QGC_OSG_QT_ENABLED
}
exists(/usr/local/include/google/protobuf) |
exists(/usr/include/google/protobuf) {
message("Building support for Protocol Buffers")
DEPENDENCIES_PRESENT += protobuf
# Include Protocol Buffers libraries
LIBS += -lprotobuf \
-lprotobuf-lite \
-lprotoc
DEFINES += QGC_PROTOBUF_ENABLED
}
exists(/usr/local/include/libfreenect/libfreenect.h) |
exists(/usr/include/libfreenect/libfreenect.h) {
message("Building support for libfreenect")
DEPENDENCIES_PRESENT += libfreenect
INCLUDEPATH += /usr/include/libusb-1.0
# Include libfreenect libraries
LIBS += -lfreenect
DEFINES += QGC_LIBFREENECT_ENABLED
}
# Validated copy commands
!exists($$TARGETDIR){
QMAKE_POST_LINK += && mkdir -p $$TARGETDIR
}
DESTDIR = $$TARGETDIR
# Copy application resources
for(COPY_DIR, COPY_RESOURCE_LIST):QMAKE_POST_LINK += && cp -rf $${COPY_DIR} $$TARGETDIR
# osg/osgEarth dynamic casts might fail without this compiler option.
# see http://osgearth.org/wiki/FAQ for details.
QMAKE_CXXFLAGS += -Wl,-E
}
linux-g++ {
message("Building for GNU/Linux 32bit/i386")
}
linux-g++-64 {
message("Building for GNU/Linux 64bit/x64 (g++-64)")
exists(/usr/local/lib64) {
LIBS += -L/usr/local/lib64 -L/usr/lib64
}
}
# Windows (32bit), Visual Studio
win32-msvc2008|win32-msvc2010|win32-msvc2012 {
win32-msvc2008 {
message(Building for Windows Visual Studio 2008 (32bit))
}
win32-msvc2010 {
message(Building for Windows Visual Studio 2010 (32bit))
}
# Specify multi-process compilation within Visual Studio.
# (drastically improves compilation times for multi-core computers)
QMAKE_CXXFLAGS_DEBUG += -MP
QMAKE_CXXFLAGS_RELEASE += -MP
# QAxContainer support is needed for the Internet Control
# element showing the Google Earth window
CONFIG += qaxcontainer
# The EIGEN library needs this define
# to make the internal min/max functions work
DEFINES += NOMINMAX
# QWebkit is not needed on MS-Windows compilation environment
CONFIG -= webkit
# Specify the inclusion of (U)INT*_(MAX/MIN) macros within Visual Studio
DEFINES += __STDC_LIMIT_MACROS
# For release builds remove support for various Qt debugging macros.
CONFIG(release, debug|release) {
DEFINES += QT_NO_DEBUG
}
# For debug releases we just want the debugging console.
CONFIG(debug, debug|release) {
CONFIG += console
}
INCLUDEPATH += $$BASEDIR/libs/lib/sdl/msvc/include \
$$BASEDIR/libs/lib/opal/include \
$$BASEDIR/libs/lib/msinttypes \
$$(QTDIR)/src/activeqt/shared
LIBS += -L$$BASEDIR/libs/lib/sdl/msvc/lib \
-lSDLmain -lSDL \
-lsetupapi
exists($$BASEDIR/libs/lib/osg123) {
message("Building support for OSG")
DEPENDENCIES_PRESENT += osg
# Include OpenSceneGraph
INCLUDEPATH += $$BASEDIR/libs/lib/osgEarth/win32/include \
$$BASEDIR/libs/lib/osgEarth_3rdparty/win32/OpenSceneGraph-2.8.2/include
LIBS += -L$$BASEDIR/libs/lib/osgEarth_3rdparty/win32/OpenSceneGraph-2.8.2/lib \
-losg \
-losgViewer \
-losgGA \
-losgDB \
-losgText \
-lOpenThreads
DEFINES += QGC_OSG_ENABLED
}
RC_FILE = $$BASEDIR/qgroundcontrol.rc
# Copy dependencies
BASEDIR_WIN = $$replace(BASEDIR,"/","\\")
TARGETDIR_WIN = $$replace(TARGETDIR,"/","\\")
COPY_RESOURCE_LIST_WIN = $$replace(COPY_RESOURCE_LIST, "/","\\")
CONFIG(debug, debug|release) {
# Copy supporting library DLLs
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\libs\\lib\\sdl\\win32\\SDL.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\libs\\mavlink" "$$TARGETDIR_WIN\\debug\\mavlink" /E /I $$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\libs\\thirdParty\\libxbee\\lib\\libxbee.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
# Copy application resources
for(COPY_DIR, COPY_RESOURCE_LIST):QMAKE_POST_LINK += $$quote(xcopy /D /Y "$${COPY_DIR}" "$$TARGETDIR_WIN\\debug" /E /I $$escape_expand(\\n))
# Copy Qt DLLs
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\plugins" "$$TARGETDIR_WIN\\debug" /E /I $$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\phonond4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtCored4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtGuid4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtMultimediad4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtNetworkd4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtOpenGLd4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtSqld4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtSvgd4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtTestd4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtWebKitd4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtXmld4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtXmlPatternsd4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtDeclaratived4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtScriptd4.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
}
CONFIG(release, debug|release) {
# Use link time code generation for beteer optimization (I believe this is supported in msvc express, but not 100% sure)
QMAKE_LFLAGS_LTCG = /LTCG
QMAKE_CFLAGS_LTCG = -GL
# Copy supporting library DLLs
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\libs\\lib\\sdl\\win32\\SDL.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\libs\\mavlink" "$$TARGETDIR_WIN\\release\\mavlink" /E /I $$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\libs\\thirdParty\\libxbee\\lib\\libxbee.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
# Copy application resources
for(COPY_DIR, COPY_RESOURCE_LIST_WIN):QMAKE_POST_LIST += $$quote(xcopy /D /Y "$${COPY_DIR}" "$$TARGETDIR_WIN\\release" /E /I $$escape_expand(\\n))
# Copy Qt DLLs
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\plugins" "$$TARGETDIR_WIN\\release" /E /I $$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\phonon4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtCore4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtGui4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtMultimedia4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtNetwork4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtOpenGL4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtSql4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtSvg4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtTestd4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtWebKit4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtXml4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtXmlPatterns4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtDeclarative4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$(QTDIR)\\bin\\QtScript4.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(del /F "$$TARGETDIR_WIN\\release\\$${TARGET}.exp"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(del /F "$$TARGETDIR_WIN\\release\\$${TARGET}"$$escape_expand(\\n))
# Copy Visual Studio DLLs
# Note that this is only done for release because the debugging versions of these DLLs cannot be redistributed.
# I'm not certain of the path for VS2008, so this only works for VS2010.
win32-msvc2010 {
QMAKE_POST_LINK += $$quote(xcopy /D /Y "\"C:\\Program Files \(x86\)\\Microsoft Visual Studio 10.0\\VC\\redist\\x86\\Microsoft.VC100.CRT\\*.dll\"" "$$TARGETDIR_WIN\\release\\"$$escape_expand(\\n))
}
}
}
# Windows (32bit)
win32-g++ {
message(Building for Windows Platform (32bit))
# Special settings for debug
CONFIG += CONSOLE
OUTPUT += CONSOLE
# The EIGEN library needs this define
# to make the internal min/max functions work
DEFINES += NOMINMAX
INCLUDEPATH += $$BASEDIR/libs/lib/sdl/include \
$$BASEDIR/libs/lib/opal/include
LIBS += -L$$BASEDIR/libs/lib/sdl/win32 \
-lmingw32 -lSDLmain -lSDL -mwindows \
-lsetupapi
CONFIG += windows
CONFIG(debug, debug|release) {
CONFIG += console
}
CONFIG(release, debug|release) {
CONFIG -= console
DEFINES += QT_NO_DEBUG
}
RC_FILE = $$BASEDIR/qgroundcontrol.rc
# Copy dependencies
system(cp): {
# CP command is available, use it instead of copy / xcopy
message("Using cp to copy image and audio files to executable")
CONFIG(debug, debug|release) {
QMAKE_POST_LINK += && cp $$BASEDIR/libs/lib/sdl/win32/SDL.dll $$TARGETDIR/debug/SDL.dll
QMAKE_POST_LINK += && cp -r $$BASEDIR/files $$TARGETDIR/debug/files
QMAKE_POST_LINK += && cp -r $$BASEDIR/libs/mavlink $$TARGETDIR/debug/mavlink
QMAKE_POST_LINK += && cp -r $$BASEDIR/models $$TARGETDIR/debug/models
}
CONFIG(release, debug|release) {
QMAKE_POST_LINK += && cp $$BASEDIR/libs/lib/sdl/win32/SDL.dll $$TARGETDIR/release/SDL.dll
QMAKE_POST_LINK += && cp -r $$BASEDIR/files $$TARGETDIR/release/files
QMAKE_POST_LINK += && cp -r $$BASEDIR/libs/mavlink $$TARGETDIR/release/mavlink
QMAKE_POST_LINK += && cp -r $$BASEDIR/models $$TARGETDIR/release/models
}
} else {
# No cp command available, go for copy / xcopy
# Copy dependencies
BASEDIR_WIN = $$replace(BASEDIR,"/","\\")
TARGETDIR_WIN = $$replace(TARGETDIR,"/","\\")
exists($$TARGETDIR/debug) {
QMAKE_POST_LINK += && copy /Y \"$$BASEDIR_WIN\\libs\\lib\\sdl\\win32\\SDL.dll\" \"$$TARGETDIR_WIN\\debug\\SDL.dll\"
QMAKE_POST_LINK += && xcopy \"$$BASEDIR_WIN\\files\" \"$$TARGETDIR_WIN\\debug\\files\\\" /S /E /Y
QMAKE_POST_LINK += && xcopy \"$$BASEDIR_WIN\\libs\\mavlink\" \"$$TARGETDIR_WIN\\debug\\mavlink\\\" /S /E /Y
QMAKE_POST_LINK += && xcopy \"$$BASEDIR_WIN\\models\" \"$$TARGETDIR_WIN\\debug\\models\\\" /S /E /Y
}
exists($$TARGETDIR/release) {
QMAKE_POST_LINK += && copy /Y \"$$BASEDIR_WIN\\libs\\lib\\sdl\\win32\\SDL.dll\" \"$$TARGETDIR_WIN\\release\\SDL.dll\"
QMAKE_POST_LINK += && xcopy \"$$BASEDIR_WIN\\files\" \"$$TARGETDIR_WIN\\release\\files\\\" /S /E /Y
QMAKE_POST_LINK += && xcopy \"$$BASEDIR_WIN\\libs\\mavlink\" \"$$TARGETDIR_WIN\\release\\mavlink\\\" /S /E /Y
QMAKE_POST_LINK += && xcopy \"$$BASEDIR_WIN\\models\" \"$$TARGETDIR_WIN\\release\\models\\\" /S /E /Y
}
}
# osg/osgEarth dynamic casts might fail without this compiler option.
# see http://osgearth.org/wiki/FAQ for details.
QMAKE_CXXFLAGS += -Wl,-E
}
......@@ -17,11 +17,59 @@
# along with QGroundControl. If not, see <http://www.gnu.org/licenses/>.
# -------------------------------------------------
message(Qt version $$[QT_VERSION])
# Setup our supported build types. We do this once here and then use the defined config scopes
# to allow us to easily modify suported build types in one place instead of duplicated throughout
# the project file.
linux-g++ | linux-g++-64 {
message(Linux build)
CONFIG += LinuxBuild
} else : win32-msvc2008 | win32-msvc2010 | win32-msvc2012 {
message(Windows build)
CONFIG += WindowsBuild
} else : macx-clang {
message(Mac build)
CONFIG += MacBuild
} else {
error(Unsupported build type)
}
# Setup our supported build flavors
CONFIG(debug, debug|release) {
message(Debug flavor)
CONFIG += DebugBuild
} else:CONFIG(release, debug|release) {
message(Release flavor)
CONFIG += ReleaseBuild
} else {
error(Unsupported build flavor)
}
# Setup our build directories
BASEDIR = $${IN_PWD}
DebugBuild {
DESTDIR = $${OUT_PWD}/debug
BUILDDIR = $${OUT_PWD}/build-debug
}
ReleaseBuild {
DESTDIR = $${OUT_PWD}/release
BUILDDIR = $${OUT_PWD}/build-release
}
OBJECTS_DIR = $${BUILDDIR}/obj
MOC_DIR = $${BUILDDIR}/moc
UI_DIR = $${BUILDDIR}/ui
RCC_DIR = $${BUILDDIR}/rcc
LANGUAGE = C++
message(BASEDIR $$BASEDIR DESTDIR $$DESTDIR TARGET $$TARGET)
# Qt configuration
CONFIG += qt \
thread \
console
thread
QT += network \
opengl \
......@@ -30,166 +78,147 @@ QT += network \
phonon \
webkit \
sql \
declarative \
testlib
# Setting this variable allows you to include this .pro file in another such that
# you can set your own TARGET and main() function. This is used by the unit test
# build files to build unit test using all built parts of QGCS except for main.
isEmpty(QGCS_UNITTEST_OVERRIDE) {
TEMPLATE = app
TARGET = qgroundcontrol
SOURCES += src/main.cc
}
declarative
BASEDIR = $${IN_PWD}
linux-g++|linux-g++-64{
CONFIG(debug, debug|release) {
TARGETDIR = $${OUT_PWD}/debug
BUILDDIR = $${OUT_PWD}/build-debug
}
CONFIG(release, debug|release) {
TARGETDIR = $${OUT_PWD}/release
BUILDDIR = $${OUT_PWD}/build-release
}
} else {
TARGETDIR = $${OUT_PWD}
BUILDDIR = $${OUT_PWD}/build
}
# Turn off serial port warnings
DEFINES += _TTY_NOWARN_
#
# OS Specific settings
#
MacBuild {
QMAKE_INFO_PLIST = Custom-Info.plist
CONFIG += x86_64
CONFIG -= x86
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
ICON = $$BASEDIR/files/images/icons/macx.icns
}
LANGUAGE = C++
OBJECTS_DIR = $${BUILDDIR}/obj
MOC_DIR = $${BUILDDIR}/moc
UI_DIR = $${BUILDDIR}/ui
RCC_DIR = $${BUILDDIR}/rcc
MAVLINK_CONF = ""
MAVLINKPATH = $$BASEDIR/libs/mavlink/include/mavlink/v1.0
DEFINES += MAVLINK_NO_DATA
LinuxBuild {
DEFINES += __STDC_LIMIT_MACROS
}
WindowsBuild {
DEFINES += __STDC_LIMIT_MACROS
win32 {
VERSION = 2.0.0.227
VERSION = 2.0.0.227
QMAKE_TARGET_COMPANY = qgroundcontrol.org
QMAKE_TARGET_PRODUCT = qgroundcontrol
QMAKE_TARGET_DESCRIPTION = "Open source ground control app provided by QGroundControl dev team"
QMAKE_TARGET_COPYRIGHT = "Copyright (C) 2013 QGroundControl Development Team. All rights reserved."
QMAKE_INCDIR_QT = $$(QTDIR)/include
QMAKE_LIBDIR_QT = $$(QTDIR)/lib
QMAKE_UIC = "$$(QTDIR)/bin/uic.exe"
QMAKE_MOC = "$$(QTDIR)/bin/moc.exe"
QMAKE_RCC = "$$(QTDIR)/bin/rcc.exe"
QMAKE_QMAKE = "$$(QTDIR)/bin/qmake.exe"
}
# Specify multi-process compilation within Visual Studio.
# (drastically improves compilation times for multi-core computers)
QMAKE_CXXFLAGS_DEBUG += -MP
QMAKE_CXXFLAGS_RELEASE += -MP
macx {
QMAKE_INFO_PLIST = Custom-Info.plist
}
#################################################################
# EXTERNAL LIBRARY CONFIGURATION
# QWebkit is not needed on MS-Windows compilation environment
CONFIG -= webkit
# EIGEN matrix library (header-only)
INCLUDEPATH += libs/eigen
RC_FILE = $$BASEDIR/qgroundcontrol.rc
}
# OPMapControl library (from OpenPilot)
include(libs/utils/utils_external.pri)
include(libs/opmapcontrol/opmapcontrol_external.pri)
DEPENDPATH += \
libs/utils \
libs/utils/src \
libs/opmapcontrol \
libs/opmapcontrol/src \
libs/opmapcontrol/src/mapwidget
#
# Build flavor specific settings
#
INCLUDEPATH += \
libs/utils \
libs \
libs/opmapcontrol \
src/qgcunittest
# 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. It will also
# create a QGC_USE_{AUTOPILOT_NAME}_MESSAGES macro for use
# within the actual code.
exists(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("------------------------------------------------------------------------")
} else {
MAVLINK_CONF += ardupilotmega
}
INCLUDEPATH += $$MAVLINKPATH
isEmpty(MAVLINK_CONF) {
INCLUDEPATH += $$MAVLINKPATH/common
} else {
INCLUDEPATH += $$MAVLINKPATH/$$MAVLINK_CONF
DEFINES += $$sprintf('QGC_USE_%1_MESSAGES', $$upper($$MAVLINK_CONF))
DebugBuild {
CONFIG += console
}
# Include general settings for QGroundControl
# necessary as last include to override any non-acceptable settings
# done by the plugins above
include(qgroundcontrol.pri)
ReleaseBuild {
DEFINES += QT_NO_DEBUG
# Include MAVLink generator
# has been deprecated
DEPENDPATH += \
src/apps/mavlinkgen
INCLUDEPATH += \
src/apps/mavlinkgen \
src/apps/mavlinkgen/ui \
src/apps/mavlinkgen/generator
WindowsBuild {
# Use link time code generation for beteer optimization (I believe this is supported in msvc express, but not 100% sure)
QMAKE_LFLAGS_LTCG = /LTCG
QMAKE_CFLAGS_LTCG = -GL
}
}
include(src/apps/mavlinkgen/mavlinkgen.pri)
#
# Unit Test specific configuration goes here (debug only)
#
# Include QUpgrade tool
exists(qupgrade) {
SOURCES += qupgrade/src/apps/qupgrade/qgcfirmwareupgradeworker.cpp \
qupgrade/src/apps/qupgrade/uploader.cpp \
qupgrade/src/apps/qupgrade/dialog_bare.cpp \
qupgrade/src/apps/qupgrade/boardwidget.cpp
DebugBuild {
HEADERS += qupgrade/src/apps/qupgrade/qgcfirmwareupgradeworker.h \
qupgrade/src/apps/qupgrade/uploader.h \
qupgrade/src/apps/qupgrade/dialog_bare.h \
qupgrade/src/apps/qupgrade/boardwidget.h
QT += testlib
INCLUDEPATH += \
src/qgcunittest
FORMS += qupgrade/src/apps/qupgrade/dialog_bare.ui \
qupgrade/src/apps/qupgrade/boardwidget.ui
HEADERS += \
src/qgcunittest/AutoTest.h \
src/qgcunittest/UASUnitTest.h \
src/qgcunittest/MockUASManager.h \
src/qgcunittest/MockUAS.h \
src/qgcunittest/MockQGCUASParamManager.h \
src/qgcunittest/MultiSignalSpy.h \
src/qgcunittest/TCPLinkTest.h \
src/qgcunittest/FlightModeConfigTest.h
RESOURCES += qupgrade/qupgrade.qrc
SOURCES += \
src/qgcunittest/UASUnitTest.cc \
src/qgcunittest/MockUASManager.cc \
src/qgcunittest/MockUAS.cc \
src/qgcunittest/MockQGCUASParamManager.cc \
src/qgcunittest/MultiSignalSpy.cc \
src/qgcunittest/TCPLinkTest.cc \
src/qgcunittest/FlightModeConfigTest.cc
}
linux*:CONFIG += qesp_linux_udev
#
# External library configuration
#
include(qupgrade/libs/qextserialport/src/qextserialport.pri)
include(QGCExternalLibs.pri)
INCLUDEPATH += qupgrade/src/apps/qupgrade
#
# Post link configuration
#
DEFINES += "QUPGRADE_SUPPORT"
}
include(QGCSetup.pri)
# Include GLC library
#include(libs/GLC_lib/glc_lib.pri)
#
# Main QGroundControl portion of project file
#
# Include QWT plotting library
include(libs/qwt/qwt.pri)
RESOURCES += qgroundcontrol.qrc
DEPENDPATH += . \
TRANSLATIONS += \
es-MX.ts \
en-US.ts
DEPENDPATH += \
. \
plugins
INCLUDEPATH += .
# Include serial port library (QSerialPort)
include(libs/serialport/qserialport.pri)
INCLUDEPATH += \
src \
src/ui \
src/ui/linechart \
src/ui/uas \
src/ui/map \
src/uas \
src/comm \
include/ui \
src/input \
src/lib/qmapcontrol \
src/ui/mavlink \
src/ui/param \
src/ui/watchdog \
src/ui/map3D \
src/ui/mission \
src/ui/designer \
src/ui/configuration \
src/ui/main
# Input
FORMS += src/ui/MainWindow.ui \
FORMS += \
src/ui/MainWindow.ui \
src/ui/CommSettings.ui \
src/ui/SerialSettings.ui \
src/ui/UASControl.ui \
......@@ -305,25 +334,8 @@ FORMS += src/ui/MainWindow.ui \
src/ui/px4_configuration/QGCPX4SensorCalibration.ui \
src/ui/designer/QGCXYPlot.ui
INCLUDEPATH += src \
src/ui \
src/ui/linechart \
src/ui/uas \
src/ui/map \
src/uas \
src/comm \
include/ui \
src/input \
src/lib/qmapcontrol \
src/ui/mavlink \
src/ui/param \
src/ui/watchdog \
src/ui/map3D \
src/ui/mission \
src/ui/designer \
src/ui/configuration \
src/ui/main
HEADERS += src/MG.h \
HEADERS += \
src/MG.h \
src/QGCCore.h \
src/uas/UASInterface.h \
src/uas/UAS.h \
......@@ -515,50 +527,8 @@ HEADERS += src/MG.h \
src/uas/UASManagerInterface.h \
src/uas/QGCUASParamManagerInterface.h
# Google Earth is only supported on Mac OS and Windows with Visual Studio Compiler
macx|macx-g++|macx-g++42|win32-msvc2008|win32-msvc2010|win32-msvc2012::HEADERS += src/ui/map3D/QGCGoogleEarthView.h
contains(DEPENDENCIES_PRESENT, osg) {
message("Including headers for OpenSceneGraph")
# Enable only if OpenSceneGraph is available
HEADERS += src/ui/map3D/gpl.h \
src/ui/map3D/CameraParams.h \
src/ui/map3D/ViewParamWidget.h \
src/ui/map3D/SystemContainer.h \
src/ui/map3D/SystemViewParams.h \
src/ui/map3D/GlobalViewParams.h \
src/ui/map3D/SystemGroupNode.h \
src/ui/map3D/Q3DWidget.h \
src/ui/map3D/GCManipulator.h \
src/ui/map3D/ImageWindowGeode.h \
src/ui/map3D/PixhawkCheetahNode.h \
src/ui/map3D/Pixhawk3DWidget.h \
src/ui/map3D/Q3DWidgetFactory.h \
src/ui/map3D/WebImageCache.h \
src/ui/map3D/WebImage.h \
src/ui/map3D/TextureCache.h \
src/ui/map3D/Texture.h \
src/ui/map3D/Imagery.h \
src/ui/map3D/HUDScaleGeode.h \
src/ui/map3D/WaypointGroupNode.h \
src/ui/map3D/TerrainParamDialog.h \
src/ui/map3D/ImageryParamDialog.h
}
contains(DEPENDENCIES_PRESENT, protobuf):contains(MAVLINK_CONF, pixhawk) {
message("Including headers for Protocol Buffers")
# Enable only if protobuf is available
HEADERS += libs/mavlink/include/mavlink/v1.0/pixhawk/pixhawk.pb.h \
src/ui/map3D/ObstacleGroupNode.h \
src/ui/map3D/GLOverlayGeode.h
}
contains(DEPENDENCIES_PRESENT, libfreenect) {
message("Including headers for libfreenect")
# Enable only if libfreenect is available
HEADERS += src/input/Freenect.h
}
SOURCES += \
src/main.cc \
src/QGCCore.cc \
src/uas/UASManager.cc \
src/uas/UAS.cc \
......@@ -739,191 +709,3 @@ SOURCES += \
src/ui/px4_configuration/QGCPX4SensorCalibration.cc \
src/ui/designer/QGCXYPlot.cc \
src/ui/menuactionhelper.cpp
CONFIG(debug, debug|release) {
# Unit Test sources/headers go here
INCLUDEPATH += \
src/qgcunittest
HEADERS += \
src/qgcunittest/AutoTest.h \
src/qgcunittest/UASUnitTest.h \
src/qgcunittest/MockUASManager.h \
src/qgcunittest/MockUAS.h \
src/qgcunittest/MockQGCUASParamManager.h \
src/qgcunittest/MultiSignalSpy.h \
src/qgcunittest/TCPLinkTest.h \
src/qgcunittest/FlightModeConfigTest.h
SOURCES += \
src/qgcunittest/UASUnitTest.cc \
src/qgcunittest/MockUASManager.cc \
src/qgcunittest/MockUAS.cc \
src/qgcunittest/MockQGCUASParamManager.cc \
src/qgcunittest/MultiSignalSpy.cc \
src/qgcunittest/TCPLinkTest.cc \
src/qgcunittest/FlightModeConfigTest.cc
}
# Enable Google Earth only on Mac OS and Windows with Visual Studio compiler
macx|macx-g++|macx-g++42|win32-msvc2008|win32-msvc2010|win32-msvc2012::SOURCES += src/ui/map3D/QGCGoogleEarthView.cc
# Enable OSG only if it has been found
contains(DEPENDENCIES_PRESENT, osg) {
message("Including sources for OpenSceneGraph")
# Enable only if OpenSceneGraph is available
SOURCES += src/ui/map3D/gpl.cc \
src/ui/map3D/CameraParams.cc \
src/ui/map3D/ViewParamWidget.cc \
src/ui/map3D/SystemContainer.cc \
src/ui/map3D/SystemViewParams.cc \
src/ui/map3D/GlobalViewParams.cc \
src/ui/map3D/SystemGroupNode.cc \
src/ui/map3D/Q3DWidget.cc \
src/ui/map3D/ImageWindowGeode.cc \
src/ui/map3D/GCManipulator.cc \
src/ui/map3D/PixhawkCheetahNode.cc \
src/ui/map3D/Pixhawk3DWidget.cc \
src/ui/map3D/Q3DWidgetFactory.cc \
src/ui/map3D/WebImageCache.cc \
src/ui/map3D/WebImage.cc \
src/ui/map3D/TextureCache.cc \
src/ui/map3D/Texture.cc \
src/ui/map3D/Imagery.cc \
src/ui/map3D/HUDScaleGeode.cc \
src/ui/map3D/WaypointGroupNode.cc \
src/ui/map3D/TerrainParamDialog.cc \
src/ui/map3D/ImageryParamDialog.cc
contains(DEPENDENCIES_PRESENT, osgearth) {
message("Including sources for osgEarth")
# Enable only if OpenSceneGraph is available
SOURCES +=
}
}
contains(DEPENDENCIES_PRESENT, protobuf):contains(MAVLINK_CONF, pixhawk) {
message("Including sources for Protocol Buffers")
# Enable only if protobuf is available
SOURCES += libs/mavlink/share/mavlink/src/v1.0/pixhawk/pixhawk.pb.cc \
src/ui/map3D/ObstacleGroupNode.cc \
src/ui/map3D/GLOverlayGeode.cc
}
contains(DEPENDENCIES_PRESENT, libfreenect) {
message("Including sources for libfreenect")
# Enable only if libfreenect is available
SOURCES += src/input/Freenect.cc
}
# Add icons and other resources
RESOURCES += qgroundcontrol.qrc
# Include RT-LAB Library
win32:exists(src/lib/opalrt/OpalApi.h):exists(C:/OPAL-RT/RT-LAB7.2.4/Common/bin) {
message("Building support for Opal-RT")
LIBS += -LC:/OPAL-RT/RT-LAB7.2.4/Common/bin \
-lOpalApi
INCLUDEPATH += src/lib/opalrt
HEADERS += src/comm/OpalRT.h \
src/comm/OpalLink.h \
src/comm/Parameter.h \
src/comm/QGCParamID.h \
src/comm/ParameterList.h \
src/ui/OpalLinkConfigurationWindow.h
SOURCES += src/comm/OpalRT.cc \
src/comm/OpalLink.cc \
src/comm/Parameter.cc \
src/comm/QGCParamID.cc \
src/comm/ParameterList.cc \
src/ui/OpalLinkConfigurationWindow.cc
FORMS += src/ui/OpalLinkSettings.ui
DEFINES += OPAL_RT
}
TRANSLATIONS += es-MX.ts \
en-US.ts
# xbee support
# libxbee only supported by linux and windows systems
win32-msvc2008|win32-msvc2010|win32-msvc2012|linux {
HEADERS += src/comm/XbeeLinkInterface.h \
src/comm/XbeeLink.h \
src/comm/HexSpinBox.h \
src/ui/XbeeConfigurationWindow.h \
src/comm/CallConv.h
SOURCES += src/comm/XbeeLink.cpp \
src/comm/HexSpinBox.cpp \
src/ui/XbeeConfigurationWindow.cpp
DEFINES += XBEELINK
INCLUDEPATH += libs/thirdParty/libxbee
# TO DO: build library when it does not exist already
LIBS += -llibs/thirdParty/libxbee/lib/libxbee
}
###################################################################
#### --- 3DConnexion 3d Mice support (e.g. spacenavigator) --- ####
###################################################################
# xdrvlib only supported by linux (theoretical all X11) systems
# You have to install the official 3DxWare driver for linux to use 3D mouse support on linux systems!
linux-g++|linux-g++-64{
exists(/usr/local/lib/libxdrvlib.so){
message("Including support for Magellan 3DxWare for linux system.")
SOURCES += src/input/Mouse6dofInput.cpp
HEADERS += src/input/Mouse6dofInput.h
LIBS += -L/usr/local/lib/ -lxdrvlib
INCLUDEPATH *= /usr/local/include
DEFINES += MOUSE_ENABLED_LINUX \
ParameterCheck # Hack: Has to be defined for magellan usage
}
}
# Support for Windows systems
# You have to install the official 3DxWare driver for Windows to use the 3D mouse support on Windows systems!
win32-msvc2008|win32-msvc2010|win32-msvc2012 {
message("Including support for 3DxWare for Windows system.")
SOURCES += libs/thirdParty/3DMouse/win/MouseParameters.cpp \
libs/thirdParty/3DMouse/win/Mouse3DInput.cpp \
src/input/Mouse6dofInput.cpp
HEADERS += libs/thirdParty/3DMouse/win/I3dMouseParams.h \
libs/thirdParty/3DMouse/win/MouseParameters.h \
libs/thirdParty/3DMouse/win/Mouse3DInput.h \
src/input/Mouse6dofInput.h
INCLUDEPATH += libs/thirdParty/3DMouse/win
DEFINES += MOUSE_ENABLED_WIN
}
OTHER_FILES += \
dongfang_notes.txt \
src/ui/dongfang-scrapyard.txt \
qml/components/DigitalDisplay.qml \
qml/components/StatusDisplay.qml
OTHER_FILES += \
qml/ApmToolBar.qml \
qml/components/Button.qml \
qml/components/TextButton.qml \
qml/resources/qgroundcontrol/toolbar/connect.png \
qml/resources/qgroundcontrol/toolbar/flightplanner.png \
qml/resources/qgroundcontrol/toolbar/helpwizard.png \
qml/resources/qgroundcontrol/toolbar/softwareconfig.png \
qml/resources/qgroundcontrol/toolbar/terminal.png \
qml/resources/qgroundcontrol/toolbar/simulation.png \
qml/resources/qgroundcontrol/toolbar/hardwareconfig.png \
qml/resources/qgroundcontrol/toolbar/flightdata.png \
qml/resources/qgroundcontrol/toolbar/disconnect.png \
qml/resources/qgroundcontrol/toolbar/donate.png \
#qmlcomponents.path += $${DESTDIR}$${TARGET}/components
#qmlcomponents.files += ./components/Button.qml
#sources.files += ApmToolBar.qml
#sources.path += $$DESTDIR/qml
#target.path += qgroundcontrol
#INSTALLS += sources target
message( BASEDIR $$BASEDIR DESTDIR $$DESTDIR TARGET $$TARGET TARGETDIR $$TARGETDIR)
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