mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-15 07:29:15 +01:00
Merged in filnet/librepilot/msys2_tidy_up (pull request #163)
Msys2_tidy_up
This commit is contained in:
commit
956d91eeea
@ -8,46 +8,51 @@ The first step is to Install all OS specific prerequisites.
|
||||
|
||||
### Mac OS X
|
||||
|
||||
Install XCode and its relatated command line tools (follow Apple documentation).
|
||||
Install git, curl and p7zip. You can use brew `brew install git curl p7zip` or macport: `sudo port install git curl p7zip`
|
||||
Install XCode and its relatated command line tools (follow Apple documentation). Install git, curl and p7zip.
|
||||
|
||||
You can use brew with `brew install git curl p7zip` or macport with `sudo port install git curl p7zip`.
|
||||
|
||||
|
||||
### Ubuntu
|
||||
|
||||
sudo apt-get install git build-essential curl gdb wget debhelper p7zip-full unzip flex bison libsdl1.2-dev libudev-dev libusb-1.0-0-dev libc6-i386 mesa-common-dev
|
||||
sudo apt-get install git build-essential curl gdb wget debhelper p7zip-full unzip flex bison libsdl1.2-dev libudev-dev libusb-1.0-0-dev libc6-i386 mesa-common-dev
|
||||
|
||||
|
||||
### Windows
|
||||
|
||||
Install [Msys2](https://msys2.github.io/) following the instructions on the web site. You can either install the i686 (32 bit) or x86_64 (64 bit) version.
|
||||
Install [Msys2](https://msys2.github.io/) following the instructions on the web site. You can either install the i686 (32 bit) or x86_64 (64 bit) version.
|
||||
|
||||
Start a "MinGW-w64 Win32 Shell" or "MinGW-w64 Win32 Win64 Shell" (NOT "MSYS2 Shell")
|
||||
Start a *MinGW-w64 Win32 Shell* or *MinGW-w64 Win64 Shell* (but **not** a *MSYS2 Shell*).
|
||||
|
||||
Install the dependent packages (32 bit):
|
||||
Install the dependent packages that match your MinGW shell.
|
||||
|
||||
pacman -S --needed git unzip tar mingw-w64-i686-toolchain mingw-w64-i686-qt5 mingw-w64-i686-SDL mingw-w64-i686-mesa mingw-w64-i686-openssl
|
||||
For 32 bit:
|
||||
|
||||
Or for a 64 bit build:
|
||||
pacman -S --needed git unzip tar mingw-w64-i686-toolchain mingw-w64-i686-qt5 mingw-w64-i686-SDL mingw-w64-i686-mesa mingw-w64-i686-openssl
|
||||
|
||||
pacman -S --needed git unzip tar mingw-w64-x86_64-toolchain mingw-w64-x86_64-qt5 mingw-w64-x86_64-SDL mingw-w64-x86_64-mesa mingw-w64-x86_64-openssl
|
||||
For 64 bit:
|
||||
|
||||
*NOTE* On Windows you need to run the mingw version of make, which is 'mingw32-make'
|
||||
pacman -S --needed git unzip tar mingw-w64-x86_64-toolchain mingw-w64-x86_64-qt5 mingw-w64-x86_64-SDL mingw-w64-x86_64-mesa mingw-w64-x86_64-openssl`
|
||||
|
||||
**NOTE** On Windows you need to run the mingw version of make, which is `mingw32-make`
|
||||
|
||||
|
||||
## Setup the build environment and build
|
||||
|
||||
The `all_sdk_install` target will automatically retrieve and install all needed tools (qt, arm gcc etc.) in a local folder `/path/to/LibrePilot_root/tools`
|
||||
The `all_sdk_install` target will automatically retrieve and install all needed tools (qt, arm gcc, etc.) in a local folder `/path/to/LibrePilot_root/tools`
|
||||
|
||||
### Ubuntu / Mac OS X
|
||||
|
||||
make all_sdk_install
|
||||
make package
|
||||
make all_sdk_install
|
||||
make package
|
||||
|
||||
### Windows
|
||||
|
||||
mingw32-make all_sdk_install
|
||||
mingw32-make package
|
||||
mingw32-make all_sdk_install
|
||||
mingw32-make package
|
||||
|
||||
The `package` target will build the complete installable package for the current platform. You can build the 'all' target to just build the software.
|
||||
The `package` target will build the complete installable package for the current platform.
|
||||
|
||||
Run make with no arguments to show the complete list of supported targets.
|
||||
You can build the `all` target to just build the software.
|
||||
|
||||
Run `make` with no arguments to show the complete list of supported targets.
|
||||
|
2
Makefile
2
Makefile
@ -603,9 +603,7 @@ help:
|
||||
@$(ECHO) " arm_sdk_install - Install the GNU ARM gcc toolchain"
|
||||
@$(ECHO) " qt_sdk_install - Install the QT development tools"
|
||||
@$(ECHO) " nsis_install - Install the NSIS Unicode (Windows only)"
|
||||
@$(ECHO) " sdl_install - Install the SDL library (Windows only)"
|
||||
@$(ECHO) " mesawin_install - Install the OpenGL32 DLL (Windows only)"
|
||||
@$(ECHO) " openssl_install - Install the OpenSSL libraries (Windows only)"
|
||||
@$(ECHO) " uncrustify_install - Install the Uncrustify source code beautifier"
|
||||
@$(ECHO) " doxygen_install - Install the Doxygen documentation generator"
|
||||
@$(ECHO) " gtest_install - Install the GoogleTest framework"
|
||||
|
@ -3,151 +3,159 @@ include(gcs.pri)
|
||||
TEMPLATE = aux
|
||||
|
||||
# Copy Qt runtime libraries into the build directory (to run or package)
|
||||
equals(copyqt, 1) {
|
||||
linux {
|
||||
QT_LIBS = libQt5Core.so.5 \
|
||||
libQt5Gui.so.5 \
|
||||
libQt5Widgets.so.5 \
|
||||
libQt5Network.so.5 \
|
||||
libQt5OpenGL.so.5 \
|
||||
libQt5Sql.so.5 \
|
||||
libQt5Svg.so.5 \
|
||||
libQt5Test.so.5 \
|
||||
libQt5Xml.so.5 \
|
||||
libQt5XmlPatterns.so.5 \
|
||||
libQt5Script.so.5 \
|
||||
libQt5Concurrent.so.5 \
|
||||
libQt5PrintSupport.so.5 \
|
||||
libQt5SerialPort.so.5 \
|
||||
libQt5Multimedia.so.5 \
|
||||
libQt5MultimediaWidgets.so.5 \
|
||||
libQt5Quick.so.5 \
|
||||
libQt5QuickWidgets.so.5 \
|
||||
libQt5Qml.so.5 \
|
||||
libQt5DBus.so.5 \
|
||||
libQt5QuickParticles.so.5 \
|
||||
libQt5XcbQpa.so.5 \
|
||||
libQt5X11Extras.so.5 \
|
||||
libicui18n.so.54 \
|
||||
libicuuc.so.54 \
|
||||
libicudata.so.54
|
||||
contains(QT_ARCH, x86_64) {
|
||||
QT_LIBS += libqgsttools_p.so.1
|
||||
}
|
||||
for(lib, QT_LIBS) {
|
||||
addCopyFileTarget($${lib},$$[QT_INSTALL_LIBS],$${GCS_QT_LIBRARY_PATH})
|
||||
}
|
||||
|
||||
QT_PLUGINS = iconengines/libqsvgicon.so \
|
||||
imageformats/libqgif.so \
|
||||
imageformats/libqico.so \
|
||||
imageformats/libqjpeg.so \
|
||||
imageformats/libqmng.so \
|
||||
imageformats/libqsvg.so \
|
||||
imageformats/libqtiff.so \
|
||||
platforms/libqxcb.so \
|
||||
xcbglintegrations/libqxcb-glx-integration.so \
|
||||
sqldrivers/libqsqlite.so
|
||||
contains(QT_ARCH, x86_64) {
|
||||
QT_PLUGINS += mediaservice/libgstaudiodecoder.so \
|
||||
mediaservice/libgstmediaplayer.so
|
||||
} else {
|
||||
QT_PLUGINS += mediaservice/libqtmedia_audioengine.so
|
||||
}
|
||||
linux {
|
||||
QT_LIBS = \
|
||||
libQt5Core.so.5 \
|
||||
libQt5Gui.so.5 \
|
||||
libQt5Widgets.so.5 \
|
||||
libQt5Network.so.5 \
|
||||
libQt5OpenGL.so.5 \
|
||||
libQt5Sql.so.5 \
|
||||
libQt5Svg.so.5 \
|
||||
libQt5Test.so.5 \
|
||||
libQt5Xml.so.5 \
|
||||
libQt5XmlPatterns.so.5 \
|
||||
libQt5Script.so.5 \
|
||||
libQt5Concurrent.so.5 \
|
||||
libQt5PrintSupport.so.5 \
|
||||
libQt5SerialPort.so.5 \
|
||||
libQt5Multimedia.so.5 \
|
||||
libQt5MultimediaWidgets.so.5 \
|
||||
libQt5Quick.so.5 \
|
||||
libQt5QuickWidgets.so.5 \
|
||||
libQt5Qml.so.5 \
|
||||
libQt5DBus.so.5 \
|
||||
libQt5QuickParticles.so.5 \
|
||||
libQt5XcbQpa.so.5 \
|
||||
libQt5X11Extras.so.5 \
|
||||
libicui18n.so.54 \
|
||||
libicuuc.so.54 \
|
||||
libicudata.so.54
|
||||
|
||||
contains(QT_ARCH, x86_64) {
|
||||
QT_LIBS += \
|
||||
libqgsttools_p.so.1
|
||||
}
|
||||
|
||||
win32 {
|
||||
# set debug suffix if needed
|
||||
CONFIG(debug, debug|release):DS = "d"
|
||||
|
||||
# copy Qt DLLs
|
||||
QT_DLLS = Qt5Core$${DS}.dll \
|
||||
Qt5Gui$${DS}.dll \
|
||||
Qt5Widgets$${DS}.dll \
|
||||
Qt5Network$${DS}.dll \
|
||||
Qt5OpenGL$${DS}.dll \
|
||||
Qt5Sql$${DS}.dll \
|
||||
Qt5Svg$${DS}.dll \
|
||||
Qt5Test$${DS}.dll \
|
||||
Qt5Xml$${DS}.dll \
|
||||
Qt5XmlPatterns$${DS}.dll \
|
||||
Qt5Script$${DS}.dll \
|
||||
Qt5Concurrent$${DS}.dll \
|
||||
Qt5PrintSupport$${DS}.dll \
|
||||
Qt5SerialPort$${DS}.dll \
|
||||
Qt5Multimedia$${DS}.dll \
|
||||
Qt5MultimediaWidgets$${DS}.dll \
|
||||
Qt5Quick$${DS}.dll \
|
||||
Qt5QuickWidgets$${DS}.dll \
|
||||
Qt5Qml$${DS}.dll \
|
||||
libicuin56.dll \
|
||||
libicudt56.dll \
|
||||
libicuuc56.dll \
|
||||
libstdc++-6.dll \
|
||||
libwinpthread-1.dll \
|
||||
libpcre16-0.dll \
|
||||
zlib1.dll \
|
||||
libharfbuzz-0.dll \
|
||||
libfreetype-6.dll \
|
||||
libbz2-1.dll \
|
||||
libpng16-16.dll \
|
||||
libglib-2.0-0.dll \
|
||||
libintl-8.dll \
|
||||
libiconv-2.dll
|
||||
contains(QT_ARCH, i386) {
|
||||
QT_DLLS += libgcc_s_dw2-1.dll
|
||||
} else {
|
||||
QT_DLLS += libgcc_s_seh-1.dll
|
||||
}
|
||||
|
||||
for(dll, QT_DLLS) {
|
||||
addCopyFileTarget($${dll},$$[QT_INSTALL_BINS],$${GCS_APP_PATH})
|
||||
}
|
||||
|
||||
# copy OpenSSL DLLs
|
||||
OPENSSL_DLLS = \
|
||||
ssleay32.dll \
|
||||
libeay32.dll
|
||||
for(dll, OPENSSL_DLLS) {
|
||||
addCopyFileTarget($${dll},$$[QT_INSTALL_BINS],$${GCS_APP_PATH})
|
||||
}
|
||||
|
||||
# copy OpenGL DLL
|
||||
OPENGL_DLLS = \
|
||||
opengl32.dll
|
||||
for(dll, OPENGL_DLLS) {
|
||||
addCopyFileTarget($${dll},$$[QT_INSTALL_BINS],$${GCS_APP_PATH}/opengl32)
|
||||
}
|
||||
|
||||
QT_PLUGINS = iconengines/qsvgicon$${DS}.dll \
|
||||
imageformats/qgif$${DS}.dll \
|
||||
imageformats/qico$${DS}.dll \
|
||||
imageformats/qjpeg$${DS}.dll \
|
||||
imageformats/qmng$${DS}.dll \
|
||||
imageformats/qsvg$${DS}.dll \
|
||||
imageformats/qtiff$${DS}.dll \
|
||||
platforms/qwindows$${DS}.dll \
|
||||
mediaservice/dsengine$${DS}.dll \
|
||||
sqldrivers/qsqlite$${DS}.dll
|
||||
for(lib, QT_LIBS) {
|
||||
addCopyFileTarget($${lib},$$[QT_INSTALL_LIBS],$${GCS_QT_LIBRARY_PATH})
|
||||
}
|
||||
|
||||
for(plugin, QT_PLUGINS) {
|
||||
addCopyFileTarget($${plugin},$$[QT_INSTALL_PLUGINS],$${GCS_QT_PLUGINS_PATH})
|
||||
}
|
||||
QT_PLUGINS = \
|
||||
iconengines/libqsvgicon.so \
|
||||
imageformats/libqgif.so \
|
||||
imageformats/libqico.so \
|
||||
imageformats/libqjpeg.so \
|
||||
imageformats/libqmng.so \
|
||||
imageformats/libqsvg.so \
|
||||
imageformats/libqtiff.so \
|
||||
platforms/libqxcb.so \
|
||||
xcbglintegrations/libqxcb-glx-integration.so \
|
||||
sqldrivers/libqsqlite.so
|
||||
|
||||
# Copy QtQuick2 complete directories
|
||||
# Some of these directories have a lot of files
|
||||
# Easier to copy everything
|
||||
QT_QUICK2_DIRS = QtQuick/Controls \
|
||||
QtQuick/Dialogs \
|
||||
QtQuick/Layouts \
|
||||
QtQuick/LocalStorage \
|
||||
QtQuick/Particles.2 \
|
||||
QtQuick/PrivateWidgets \
|
||||
QtQuick/Window.2 \
|
||||
QtQuick/XmlListModel \
|
||||
QtQuick.2
|
||||
for(dir, QT_QUICK2_DIRS) {
|
||||
addCopyDirTarget($${dir},$$[QT_INSTALL_QML],$${GCS_QT_QML_PATH})
|
||||
contains(QT_ARCH, x86_64) {
|
||||
QT_PLUGINS += \
|
||||
mediaservice/libgstaudiodecoder.so \
|
||||
mediaservice/libgstmediaplayer.so
|
||||
} else {
|
||||
QT_PLUGINS += \
|
||||
mediaservice/libqtmedia_audioengine.so
|
||||
}
|
||||
}
|
||||
|
||||
win32 {
|
||||
# set debug suffix if needed
|
||||
CONFIG(debug, debug|release):DS = "d"
|
||||
|
||||
# copy Qt DLLs
|
||||
QT_DLLS = \
|
||||
Qt5Core$${DS}.dll \
|
||||
Qt5Gui$${DS}.dll \
|
||||
Qt5Widgets$${DS}.dll \
|
||||
Qt5Network$${DS}.dll \
|
||||
Qt5OpenGL$${DS}.dll \
|
||||
Qt5Sql$${DS}.dll \
|
||||
Qt5Svg$${DS}.dll \
|
||||
Qt5Test$${DS}.dll \
|
||||
Qt5Xml$${DS}.dll \
|
||||
Qt5XmlPatterns$${DS}.dll \
|
||||
Qt5Script$${DS}.dll \
|
||||
Qt5Concurrent$${DS}.dll \
|
||||
Qt5PrintSupport$${DS}.dll \
|
||||
Qt5SerialPort$${DS}.dll \
|
||||
Qt5Multimedia$${DS}.dll \
|
||||
Qt5MultimediaWidgets$${DS}.dll \
|
||||
Qt5Quick$${DS}.dll \
|
||||
Qt5QuickWidgets$${DS}.dll \
|
||||
Qt5Qml$${DS}.dll \
|
||||
libicuin56.dll \
|
||||
libicudt56.dll \
|
||||
libicuuc56.dll \
|
||||
libstdc++-6.dll \
|
||||
libwinpthread-1.dll \
|
||||
libpcre16-0.dll \
|
||||
zlib1.dll \
|
||||
libharfbuzz-0.dll \
|
||||
libfreetype-6.dll \
|
||||
libbz2-1.dll \
|
||||
libpng16-16.dll \
|
||||
libglib-2.0-0.dll \
|
||||
libintl-8.dll \
|
||||
libiconv-2.dll
|
||||
|
||||
contains(QT_ARCH, i386) {
|
||||
QT_DLLS += \
|
||||
libgcc_s_dw2-1.dll
|
||||
} else {
|
||||
QT_DLLS += \
|
||||
libgcc_s_seh-1.dll
|
||||
}
|
||||
|
||||
for(dll, QT_DLLS) {
|
||||
addCopyFileTarget($${dll},$$[QT_INSTALL_BINS],$${GCS_APP_PATH})
|
||||
}
|
||||
|
||||
# copy OpenSSL DLLs
|
||||
OPENSSL_DLLS = \
|
||||
ssleay32.dll \
|
||||
libeay32.dll
|
||||
|
||||
for(dll, OPENSSL_DLLS) {
|
||||
addCopyFileTarget($${dll},$$[QT_INSTALL_BINS],$${GCS_APP_PATH})
|
||||
}
|
||||
|
||||
QT_PLUGINS = \
|
||||
iconengines/qsvgicon$${DS}.dll \
|
||||
imageformats/qgif$${DS}.dll \
|
||||
imageformats/qico$${DS}.dll \
|
||||
imageformats/qjpeg$${DS}.dll \
|
||||
imageformats/qmng$${DS}.dll \
|
||||
imageformats/qsvg$${DS}.dll \
|
||||
imageformats/qtiff$${DS}.dll \
|
||||
platforms/qwindows$${DS}.dll \
|
||||
mediaservice/dsengine$${DS}.dll \
|
||||
sqldrivers/qsqlite$${DS}.dll
|
||||
}
|
||||
|
||||
for(plugin, QT_PLUGINS) {
|
||||
addCopyFileTarget($${plugin},$$[QT_INSTALL_PLUGINS],$${GCS_QT_PLUGINS_PATH})
|
||||
}
|
||||
|
||||
# Copy QtQuick2 complete directories
|
||||
# Some of these directories have a lot of files
|
||||
# Easier to copy everything
|
||||
QT_QUICK2_DIRS = \
|
||||
QtQuick/Controls \
|
||||
QtQuick/Dialogs \
|
||||
QtQuick/Layouts \
|
||||
QtQuick/LocalStorage \
|
||||
QtQuick/Particles.2 \
|
||||
QtQuick/PrivateWidgets \
|
||||
QtQuick/Window.2 \
|
||||
QtQuick/XmlListModel \
|
||||
QtQuick.2
|
||||
|
||||
for(dir, QT_QUICK2_DIRS) {
|
||||
addCopyDirTarget($${dir},$$[QT_INSTALL_QML],$${GCS_QT_QML_PATH})
|
||||
}
|
||||
|
@ -103,6 +103,9 @@ equals(TEST, 1) {
|
||||
DEFINES += WITH_TESTS
|
||||
}
|
||||
|
||||
# don't build both debug and release
|
||||
CONFIG -= debug_and_release
|
||||
|
||||
#ideally, we would want a qmake.conf patch, but this does the trick...
|
||||
win32:!isEmpty(QMAKE_SH):QMAKE_COPY_DIR = cp -r -f
|
||||
|
||||
@ -171,15 +174,6 @@ macx {
|
||||
!isEqual(GCS_SOURCE_TREE, $$GCS_BUILD_TREE):copydata = 1
|
||||
|
||||
win32 {
|
||||
SDL_DIR = $$(SDL_DIR)
|
||||
isEmpty(SDL_DIR):SDL_DIR = $${TOOLS_DIR}/SDL-1.2.15
|
||||
|
||||
OPENSSL_DIR = $$(OPENSSL_DIR)
|
||||
isEmpty(OPENSSL_DIR):OPENSSL_DIR = $${TOOLS_DIR}/openssl-1.0.1e-win32
|
||||
|
||||
MESAWIN_DIR = $$(MESAWIN_DIR)
|
||||
isEmpty(MESAWIN_DIR):MESAWIN_DIR = $${TOOLS_DIR}/mesawin
|
||||
|
||||
GCS_QT_PLUGINS_PATH = $$GCS_APP_PATH
|
||||
GCS_QT_QML_PATH = $$GCS_APP_PATH
|
||||
|
||||
@ -259,4 +253,3 @@ macx {
|
||||
# use ccache when available
|
||||
QMAKE_CC = $$(CCACHE) $$QMAKE_CC
|
||||
QMAKE_CXX = $$(CCACHE) $$QMAKE_CXX
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
#
|
||||
# Qmake project for the OpenPilot GCS.
|
||||
# Qmake project for the LibrePilot GCS.
|
||||
# Copyright (c) 2009-2013, The OpenPilot Team, http://www.openpilot.org
|
||||
# Copyright (c) 2015-2016, The LibrePilot Team, http://www.librepilot.org
|
||||
#
|
||||
|
||||
cache()
|
||||
@ -31,6 +32,13 @@ CONFIG += ordered
|
||||
|
||||
DEFINES += USE_PATHPLANNER
|
||||
|
||||
SUBDIRS = src copydata
|
||||
SUBDIRS = src
|
||||
|
||||
copydata.file = copydata.pro
|
||||
equals(copyqt, 1) {
|
||||
SUBDIRS += copydata
|
||||
copydata.file = copydata.pro
|
||||
win32 {
|
||||
SUBDIRS += opengl
|
||||
opengl.file = opengl.pro
|
||||
}
|
||||
}
|
||||
|
38
ground/gcs/opengl.pro
Normal file
38
ground/gcs/opengl.pro
Normal file
@ -0,0 +1,38 @@
|
||||
# copy legacy OpenGL DLL
|
||||
|
||||
TEMPLATE = aux
|
||||
|
||||
include(gcs.pri)
|
||||
|
||||
MESAWIN_DIR = $$(MESAWIN_DIR)
|
||||
isEmpty(MESAWIN_DIR):MESAWIN_DIR = $${TOOLS_DIR}/mesawin
|
||||
|
||||
# opengl32.dll will be copied to ./bin/opengl32/ for the installer to use
|
||||
# the installer packages the dll and optionally allows to install it to ./bin/
|
||||
# this implies that the opengl32.dll will not be used in a dev environment,
|
||||
# unless it is copied to the ./bin/ ...
|
||||
|
||||
exists($${MESAWIN_DIR}) {
|
||||
contains(QT_ARCH, i386) {
|
||||
# take opengl32.dll from mesa (32 bit)
|
||||
OPENGL_DIR = $${MESAWIN_DIR}/opengl32_32
|
||||
}
|
||||
else {
|
||||
# take opengl32.dll from mesa (64 bit)
|
||||
OPENGL_DIR = $${MESAWIN_DIR}/opengl32_64
|
||||
}
|
||||
}
|
||||
else {
|
||||
# take opengl32.dll from mingw32/bin/
|
||||
# WARNING : doesn't currently work, GCS crashes at startup when using msys2 opengl32.dll
|
||||
warning("msys2 opengl32.dll breaks GCS, please install mesa with: make mesawin_install")
|
||||
# skip installing opengl32.dll, the package target will fail when creating the installer
|
||||
#OPENGL_DIR = $$[QT_INSTALL_BINS]
|
||||
}
|
||||
|
||||
OPENGL_DLLS = \
|
||||
opengl32.dll
|
||||
|
||||
exists($${OPENGL_DIR}):for(dll, OPENGL_DLLS) {
|
||||
addCopyFileTarget($${dll},$${OPENGL_DIR},$${GCS_APP_PATH}/opengl32)
|
||||
}
|
@ -1,10 +1,9 @@
|
||||
equals(copydata, 1) {
|
||||
win32 {
|
||||
# copy SDL DLL
|
||||
SDL_DLLS = \
|
||||
SDL.dll
|
||||
for(dll, SDL_DLLS) {
|
||||
addCopyFileTarget($${dll},$$[QT_INSTALL_BINS],$${GCS_APP_PATH})
|
||||
}
|
||||
win32 {
|
||||
# copy SDL DLL
|
||||
SDL_DLLS = \
|
||||
SDL.dll
|
||||
|
||||
for(dll, SDL_DLLS) {
|
||||
addCopyFileTarget($${dll},$$[QT_INSTALL_BINS],$${GCS_APP_PATH})
|
||||
}
|
||||
}
|
||||
|
@ -28,19 +28,16 @@ macx {
|
||||
# Ensures that SDL framework and header files are found when compiled with Qt5.2.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
|
||||
LIBS += -framework OpenGL -framework SDL -framework Cocoa
|
||||
}
|
||||
|
||||
win32 {
|
||||
INCLUDEPATH += $${SDL_DIR}/include
|
||||
LIBS += -L$${SDL_DIR}/lib
|
||||
}
|
||||
|
||||
!mac:LIBS += -lSDL
|
||||
|
||||
SOURCES += \
|
||||
@ -56,4 +53,4 @@ OTHER_FILES += \
|
||||
sdlgamepad.dox \
|
||||
sdlgamepad.doc
|
||||
|
||||
include(copydata.pro)
|
||||
equals(copydata, 1):include(copydata.pro)
|
||||
|
36
ground/gcs/src/plugins/hitl/aerosimrc/src/copydata.pro
Normal file
36
ground/gcs/src/plugins/hitl/aerosimrc/src/copydata.pro
Normal file
@ -0,0 +1,36 @@
|
||||
# Windows only
|
||||
|
||||
# set debug suffix if needed
|
||||
win32:CONFIG(debug, debug|release):DS = "d"
|
||||
|
||||
win32 {
|
||||
# resources and sample configuration
|
||||
PLUGIN_RESOURCES = \
|
||||
cc_off.tga \
|
||||
cc_off_hover.tga \
|
||||
cc_on.tga \
|
||||
cc_on_hover.tga \
|
||||
cc_plugin.ini \
|
||||
plugin.txt
|
||||
|
||||
for(res, PLUGIN_RESOURCES) {
|
||||
addCopyFileTarget($${res},$${RES_DIR},$${PLUGIN_DIR})
|
||||
}
|
||||
|
||||
# Qt DLLs
|
||||
QT_DLLS = \
|
||||
Qt5Core$${DS}.dll \
|
||||
Qt5Network$${DS}.dll
|
||||
|
||||
for(dll, QT_DLLS) {
|
||||
addCopyFileTarget($${dll},$$[QT_INSTALL_BINS],$${SIM_DIR})
|
||||
}
|
||||
|
||||
# MinGW DLLs
|
||||
#MINGW_DLLS = \
|
||||
# libgcc_s_dw2-1.dll \
|
||||
# mingwm10.dll
|
||||
#for(dll, MINGW_DLLS) {
|
||||
# addCopyFileTarget($${dll},$$(QTMINGW),$${SIM_DIR})
|
||||
#}
|
||||
}
|
@ -1,15 +1,15 @@
|
||||
TEMPLATE = lib
|
||||
TARGET = plugin_AeroSIMRC
|
||||
|
||||
QT += network
|
||||
QT -= gui
|
||||
|
||||
!win32 {
|
||||
error("AeroSimRC plugin is only available for win32 platform")
|
||||
}
|
||||
|
||||
include(../../../../../gcs.pri)
|
||||
|
||||
QT += network
|
||||
QT -= gui
|
||||
|
||||
TEMPLATE = lib
|
||||
TARGET = plugin_AeroSIMRC
|
||||
|
||||
RES_DIR = $${PWD}/resources
|
||||
SIM_DIR = $$GCS_BUILD_TREE/misc/AeroSIM-RC
|
||||
PLUGIN_DIR = $$SIM_DIR/Plugin/CopterControl
|
||||
@ -30,37 +30,4 @@ SOURCES = \
|
||||
settings.cpp
|
||||
|
||||
# Resemble the AeroSimRC directory structure and copy plugin files and resources
|
||||
equals(copydata, 1) {
|
||||
|
||||
# Windows release only
|
||||
win32:CONFIG(release, debug|release) {
|
||||
|
||||
# resources and sample configuration
|
||||
PLUGIN_RESOURCES = \
|
||||
cc_off.tga \
|
||||
cc_off_hover.tga \
|
||||
cc_on.tga \
|
||||
cc_on_hover.tga \
|
||||
cc_plugin.ini \
|
||||
plugin.txt
|
||||
for(res, PLUGIN_RESOURCES) {
|
||||
addCopyFileTarget($${res},$${RES_DIR},$${PLUGIN_DIR})
|
||||
}
|
||||
|
||||
# Qt DLLs
|
||||
QT_DLLS = \
|
||||
Qt5Core.dll \
|
||||
Qt5Network.dll
|
||||
for(dll, QT_DLLS) {
|
||||
addCopyFileTarget($${dll},$$[QT_INSTALL_BINS],$${SIM_DIR})
|
||||
}
|
||||
|
||||
# MinGW DLLs
|
||||
#MINGW_DLLS = \
|
||||
# libgcc_s_dw2-1.dll \
|
||||
# mingwm10.dll
|
||||
#for(dll, MINGW_DLLS) {
|
||||
# addCopyFileTarget($${dll},$$(QTMINGW),$${SIM_DIR})
|
||||
#}
|
||||
}
|
||||
}
|
||||
equals(copydata, 1):include(copydata.pro)
|
||||
|
@ -22,6 +22,7 @@ UNAME := $(shell uname)
|
||||
# Here and everywhere if not Linux or Mac then assume Windows
|
||||
ifeq ($(filter Linux Darwin, $(UNAME)), )
|
||||
UNAME := Windows
|
||||
CC := gcc# because cc doesn't exist
|
||||
endif
|
||||
|
||||
ifeq ($(UNAME),Windows)
|
||||
|
@ -11,8 +11,6 @@
|
||||
# arm_sdk_install
|
||||
# qt_sdk_install
|
||||
# nsis_install (Windows only)
|
||||
# sdl_install (Windows only)
|
||||
# openssl_install (Windows only)
|
||||
# mesawin_install (Windows only)
|
||||
# uncrustify_install
|
||||
# doxygen_install
|
||||
@ -117,11 +115,9 @@ else ifeq ($(UNAME), Windows)
|
||||
QT_SDK_MD5_URL := http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-windows-x86-mingw492-5.5.1.exe.md5
|
||||
QT_SDK_ARCH := mingw492_32
|
||||
NSIS_URL := http://librepilot.github.io/tools/nsis-2.46-unicode.tar.bz2
|
||||
SDL_URL := http://librepilot.github.io/tools/SDL-devel-1.2.15-mingw32.tar.gz
|
||||
OPENSSL_URL := http://librepilot.github.io/tools/openssl-1.0.1e-win32.tar.bz2
|
||||
MESAWIN_URL := http://librepilot.github.io/tools/mesawin.tar.gz
|
||||
UNCRUSTIFY_URL := http://librepilot.github.io/tools/uncrustify-0.60-windows.tar.bz2
|
||||
DOXYGEN_URL := http://librepilot.github.io/tools/doxygen-1.8.3.1-windows.tar.bz2
|
||||
MESAWIN_URL := http://librepilot.github.io/tools/mesawin.tar.gz
|
||||
OSG_URL := http://librepilot.github.io/tools/osg-3.4-mingw492_32-qt-5.5.1.tar.gz
|
||||
OSGEARTH_URL := http://librepilot.github.io/tools/osgearth-2.7-mingw492_32-qt-5.5.1.tar.gz
|
||||
endif
|
||||
@ -153,9 +149,6 @@ else ifeq ($(UNAME), Windows)
|
||||
# When changing PYTHON_DIR, you must also update it in ground/gcs/src/python.pri
|
||||
PYTHON_DIR := $(QT_SDK_DIR)/Tools/$(QT_SDK_ARCH)/opt/bin
|
||||
NSIS_DIR := $(TOOLS_DIR)/nsis-2.46-unicode
|
||||
# When changing SDL_DIR or OPENSSL_DIR, you must also update them in ground/gcs/gcs.pri
|
||||
SDL_DIR := $(TOOLS_DIR)/SDL-1.2.15
|
||||
OPENSSL_DIR := $(TOOLS_DIR)/openssl-1.0.1e-win32
|
||||
MESAWIN_DIR := $(TOOLS_DIR)/mesawin
|
||||
OSG_SDK_DIR := $(OSG_TOOLS_DIR)/osg-3.4-mingw492_32-qt-5.5.1
|
||||
OSGEARTH_SDK_DIR := $(OSG_TOOLS_DIR)/osgearth-2.7-mingw492_32-qt-5.5.1
|
||||
@ -171,7 +164,7 @@ QT_SDK_PREFIX := $(QT_SDK_DIR)
|
||||
|
||||
BUILD_SDK_TARGETS := arm_sdk osg
|
||||
ifeq ($(UNAME), Windows)
|
||||
BUILD_SDK_TARGETS += nsis osgearth
|
||||
BUILD_SDK_TARGETS += nsis mesawin osgearth
|
||||
else
|
||||
BUILD_SDK_TARGETS += qt_sdk
|
||||
endif
|
||||
@ -641,29 +634,6 @@ nsis_version:
|
||||
|
||||
endif
|
||||
|
||||
##############################
|
||||
#
|
||||
# SDL (Windows only)
|
||||
#
|
||||
##############################
|
||||
|
||||
ifeq ($(UNAME), Windows)
|
||||
|
||||
$(eval $(call TOOL_INSTALL_TEMPLATE,sdl,$(SDL_DIR),$(SDL_URL),,$(notdir $(SDL_URL))))
|
||||
|
||||
ifeq ($(shell [ -d "$(SDL_DIR)" ] && $(ECHO) "exists"), exists)
|
||||
export SDL_DIR := $(SDL_DIR)
|
||||
else
|
||||
# not installed, hope it's in the path...
|
||||
$(info $(EMPTY) WARNING $(call toprel, $(SDL_DIR)) not found (make sdl_install), using system PATH)
|
||||
endif
|
||||
|
||||
.PHONY: sdl_version
|
||||
sdl_version:
|
||||
-$(V1) $(ECHO) "SDL 1.2.15"
|
||||
|
||||
endif
|
||||
|
||||
##################################
|
||||
#
|
||||
# Mesa OpenGL DLL (Windows only)
|
||||
@ -687,31 +657,6 @@ mesawin_version:
|
||||
|
||||
endif
|
||||
|
||||
##############################
|
||||
#
|
||||
# OpenSSL (Windows only)
|
||||
#
|
||||
##############################
|
||||
|
||||
ifeq ($(UNAME), Windows)
|
||||
|
||||
$(eval $(call TOOL_INSTALL_TEMPLATE,openssl,$(OPENSSL_DIR),$(OPENSSL_URL),,$(notdir $(OPENSSL_URL))))
|
||||
|
||||
ifeq ($(shell [ -d "$(OPENSSL_DIR)" ] && $(ECHO) "exists"), exists)
|
||||
export OPENSSL := $(OPENSSL_DIR)/bin/openssl
|
||||
export OPENSSL_CONF := $(OPENSSL_DIR)/bin/openssl.cfg
|
||||
export OPENSSL_DIR
|
||||
else
|
||||
# not installed, hope it's in the path...
|
||||
# $(info $(EMPTY) WARNING $(call toprel, $(OPENSSL_DIR)) not found (make openssl_install), using system PATH)
|
||||
endif
|
||||
|
||||
.PHONY: openssl_version
|
||||
openssl_version:
|
||||
-$(V1) $(ECHO) "OpenSSL `$(OPENSSL) version`"
|
||||
|
||||
endif
|
||||
|
||||
##############################
|
||||
#
|
||||
# Uncrustify
|
||||
|
Loading…
x
Reference in New Issue
Block a user