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

Merged in james-duley/librepilot/msys2_osg_hotfix (pull request #170)

hotfix: use msys2 osg, disable osgearth by default
This commit is contained in:
James Duley 2016-01-31 12:31:46 +00:00
commit 07a9042832
5 changed files with 35 additions and 32 deletions

View File

@ -28,11 +28,11 @@ Install the dependent packages that match your MinGW shell.
For 32 bit:
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-i686-toolchain mingw-w64-i686-qt5 mingw-w64-i686-SDL mingw-w64-i686-mesa mingw-w64-i686-openssl mingw-w64-i686-OpenSceneGraph
For 64 bit:
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
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 mingw-w64-x86_64-OpenSceneGraph
**NOTE** On Windows you need to run the mingw version of make, which is `mingw32-make`

View File

@ -153,9 +153,6 @@ GCS_EXTRA_CONF :=
# osg & osgearth
GCS_EXTRA_CONF += osg copy_osg
ifeq ($(UNAME), Windows)
GCS_EXTRA_CONF += osgearth
endif
##############################
#

View File

@ -11,8 +11,11 @@ contains(QT_ARCH, x86_64) {
LIB_DIR_NAME = lib
}
!msys2:OSG_VERSION = 3.4.0
msys2:OSG_VERSION = 3.5.1
win32 {
OSG_VERSION = 3.5.1
} else {
OSG_VERSION = 3.4.0
}
osg:linux {
@ -63,22 +66,14 @@ osg:win32 {
libssh2-1.dll
# gdal
OSG_LIBS += \
libgdal-20.dll \
libgeos_c.dll \
libgeos.dll \
libjpeg-8.dll \
libtiff-5.dll \
liblzma-5.dll \
libiconv-2.dll \
zlib1.dll
# other
OSG_LIBS += \
libproj-9.dll \
libfreetype-6.dll \
libpng16-16.dll
libpng16-16.dll \
libiconv-2.dll \
zlib1.dll
# osg libraries
OSG_LIBS += \
@ -194,6 +189,15 @@ osgearth:win32 {
libosgEarthSymbology$${DS}.dll \
libosgEarthUtil$${DS}.dll
# gdal
OSGEARTH_LIBS += \
libgdal-20.dll \
libgeos_c.dll \
libgeos.dll \
libjpeg-8.dll \
libtiff-5.dll \
liblzma-5.dll
osgearthQt:OSGEARTH_LIBS += \
libosgEarthQt$${DS}.dll

View File

@ -11,38 +11,44 @@ contains(QT_ARCH, x86_64) {
}
osg {
OSG_SDK_DIR = $$clean_path($$(OSG_SDK_DIR))
win32 {
OSG_SDK_DIR = $$clean_path($$[QT_INSTALL_BINS]/..)
} else {
OSG_SDK_DIR = $$clean_path($$(OSG_SDK_DIR))
}
message(Using osg from here: $$OSG_SDK_DIR)
INCLUDEPATH += $$OSG_SDK_DIR/include
linux|macx {
INCLUDEPATH += $$OSG_SDK_DIR/include
LIBS += -L$$OSG_SDK_DIR/$$LIB_DIR_NAME
LIBS += -lOpenThreads -losg -losgUtil -losgDB -losgGA -losgFX -losgViewer -losgText
osgQt:LIBS += -losgQt
}
win32 {
LIBS += -L$$OSG_SDK_DIR/lib
LIBS += -lOpenThreads$${DS} -losg$${DS} -losgUtil$${DS} -losgDB$${DS} -losgGA$${DS} -losgFX$${DS} -losgViewer$${DS} -losgText$${DS}
osgQt:LIBS += -losgQt$${DS}
}
}
osgearth {
OSGEARTH_SDK_DIR = $$clean_path($$(OSGEARTH_SDK_DIR))
win32 {
OSGEARTH_SDK_DIR = $$clean_path($$[QT_INSTALL_BINS]/..)
} else {
OSGEARTH_SDK_DIR = $$clean_path($$(OSGEARTH_SDK_DIR))
}
message(Using osgearth from here: $$OSGEARTH_SDK_DIR)
INCLUDEPATH += $$OSGEARTH_SDK_DIR/include
linux|macx {
INCLUDEPATH += $$OSGEARTH_SDK_DIR/include
LIBS += -L$$OSGEARTH_SDK_DIR/$$LIB_DIR_NAME
LIBS += -losgEarth -losgEarthUtil -losgEarthFeatures -losgEarthSymbology -losgEarthAnnotation
osgearthQt:LIBS += -losgEarthQt
}
win32 {
LIBS += -L$$OSGEARTH_SDK_DIR/lib
LIBS += -losgEarth$${DS} -losgEarthUtil$${DS} -losgEarthFeatures$${DS} -losgEarthSymbology$${DS} -losgEarthAnnotation$${DS}
osgearthQt:LIBS += -losgEarthQt$${DS}
}

View File

@ -118,8 +118,6 @@ else ifeq ($(UNAME), Windows)
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
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
GTEST_URL := http://librepilot.github.io/tools/gtest-1.6.0.zip
@ -151,8 +149,6 @@ else ifeq ($(UNAME), Windows)
PYTHON_DIR := $(QT_SDK_DIR)/Tools/$(QT_SDK_ARCH)/opt/bin
NSIS_DIR := $(TOOLS_DIR)/nsis-2.46-unicode
MESAWIN_DIR := $(TOOLS_DIR)/mesawin
OSG_SDK_DIR := $(OSG_TOOLS_DIR)/osg-3.4-mingw492_32-qt-$(QT_VERSION)
OSGEARTH_SDK_DIR := $(OSG_TOOLS_DIR)/osgearth-2.7-mingw492_32-qt-$(QT_VERSION)
endif
QT_SDK_PREFIX := $(QT_SDK_DIR)
@ -163,11 +159,11 @@ QT_SDK_PREFIX := $(QT_SDK_DIR)
#
##############################
BUILD_SDK_TARGETS := arm_sdk osg
BUILD_SDK_TARGETS := arm_sdk
ifeq ($(UNAME), Windows)
BUILD_SDK_TARGETS += nsis mesawin osgearth
BUILD_SDK_TARGETS += nsis mesawin
else
BUILD_SDK_TARGETS += qt_sdk
BUILD_SDK_TARGETS += qt_sdk osg
endif
ALL_SDK_TARGETS := $(BUILD_SDK_TARGETS) gtest uncrustify doxygen