From 16d52016e17fcc5ee2a1e661872e2ba568bd912a Mon Sep 17 00:00:00 2001 From: James Duley Date: Sun, 31 Jan 2016 10:25:55 +0000 Subject: [PATCH] hotfix: use msys2 osg, disable osgearth by default --- CONTRIBUTING.md | 4 +-- Makefile | 3 -- ground/gcs/src/libs/osgearth/copydata.pro | 32 +++++++++++-------- .../libs/osgearth/osgearth_dependencies.pri | 18 +++++++---- make/tools.mk | 10 ++---- 5 files changed, 35 insertions(+), 32 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a82ed7f40..71a62ac26 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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` diff --git a/Makefile b/Makefile index 8c3e1c758..7a5bc2d06 100644 --- a/Makefile +++ b/Makefile @@ -153,9 +153,6 @@ GCS_EXTRA_CONF := # osg & osgearth GCS_EXTRA_CONF += osg copy_osg -ifeq ($(UNAME), Windows) - GCS_EXTRA_CONF += osgearth -endif ############################## # diff --git a/ground/gcs/src/libs/osgearth/copydata.pro b/ground/gcs/src/libs/osgearth/copydata.pro index 992f8e4c7..09509ff14 100644 --- a/ground/gcs/src/libs/osgearth/copydata.pro +++ b/ground/gcs/src/libs/osgearth/copydata.pro @@ -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 diff --git a/ground/gcs/src/libs/osgearth/osgearth_dependencies.pri b/ground/gcs/src/libs/osgearth/osgearth_dependencies.pri index c3d55285c..b1f123f5c 100644 --- a/ground/gcs/src/libs/osgearth/osgearth_dependencies.pri +++ b/ground/gcs/src/libs/osgearth/osgearth_dependencies.pri @@ -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} } diff --git a/make/tools.mk b/make/tools.mk index 1fe5788e2..f7cceeddb 100644 --- a/make/tools.mk +++ b/make/tools.mk @@ -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