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

LP-491 upgrade 3rdparty build to osg 3.5.5 and osgearth 2.8

from osg 3.5.3 and osgearth 2.7

the osg upgrade allows removal of the Qt dependency
this means that we don't need to recompile osg and
osgearth for all OSes each time we upgrade Qt :)
This commit is contained in:
Philippe Renon 2017-03-10 17:29:53 +01:00
parent 27d3fb0751
commit ad84e51a04
10 changed files with 179 additions and 209 deletions

View File

@ -11,7 +11,7 @@ Make sure all LibrePilot SDKs are up to date as the osgEarth build relies on the
More details can be found in osgearth.mk.
Linux prerequisites
Linux
----------------------------------
$ sudo apt-get install libzip-dev libpng-dev lipjpeg-dev libtiff5-dev libcurl4-openssl-dev
@ -20,22 +20,13 @@ $ sudo apt-get install libgeos++-dev libgdal-dev
Alternative (not tested recently but could work):
$ sudo apt-get build-dep openscenegraph
Tested with:
$ curl --version
curl 7.35.0 (i686-pc-linux-gnu) libcurl/7.35.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3
$ gdal-config --version
1.10.1
OSX prerequisites
OSX
----------------------------------
brew install cmake
brew install gdal
Windows prerequisites
Windows
----------------------------------
pacman -S mingw-w64-i686-cmake mingw-w64-i686-gdal-minimal
@ -59,6 +50,18 @@ Todo
- declare provides=<original pkgname> and conflicts with origina gdal in PKGBUILD file
(allows to substitute the minimal package when anything depends on the original package)
Dependencies
----------------------------------
GDAL GEOS
MSYS2 2.0.1 3.6.1
Trusty 3.4.2
Xenial 3.5.0
OSX 1.11.5 3.6.1
$ gdal-config --version
$ geos-config --version
Building
----------------------------------

View File

@ -1,24 +0,0 @@
diff --git a/include/osg/OperationThread b/include/osg/OperationThread
index a62157e..75adfba 100644
--- a/include/osg/OperationThread
+++ b/include/osg/OperationThread
@@ -80,6 +80,7 @@ protected:
_keep(false) {}
Operation(const Operation& op):
+ Referenced(),
_name(op._name),
_keep(op._keep) {}
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 33edf57..d2ea025 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -27,7 +27,6 @@ FOREACH( mylibfolder
osgUI
osgVolume
osgWrappers/serializers
- osgWrappers/deprecated-dotosg
osgPlugins
)

View File

@ -1,24 +0,0 @@
diff --git a/include/osg/OperationThread b/include/osg/OperationThread
index a62157e..75adfba 100644
--- a/include/osg/OperationThread
+++ b/include/osg/OperationThread
@@ -80,6 +80,7 @@ protected:
_keep(false) {}
Operation(const Operation& op):
+ Referenced(),
_name(op._name),
_keep(op._keep) {}
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 33edf57..d2ea025 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -27,7 +27,6 @@ FOREACH( mylibfolder
osgUI
osgVolume
osgWrappers/serializers
- osgWrappers/deprecated-dotosg
osgPlugins
)

View File

@ -1,13 +0,0 @@
diff --git a/include/osgViewer/View b/include/osgViewer/View
index 472b489..07ef9ce 100644
--- a/include/osgViewer/View
+++ b/include/osgViewer/View
@@ -127,7 +127,7 @@ class OSGVIEWER_EXPORT View : public osg::View, public osgGA::GUIActionAdapter
/** Set the View's image pager.*/
void setImagePager(osgDB::ImagePager* ip);
- template<class T> void setImagePager(const osg::ref_ptr<T>* ip) { setImagePager(ip.get()); }
+ template<class T> void setImagePager(const osg::ref_ptr<T>& ip) { setImagePager(ip.get()); }
/** Get the View's image pager.*/
osgDB::ImagePager* getImagePager();

View File

@ -1,13 +0,0 @@
diff --git a/src/osgPlugins/cfg/CMakeLists.txt b/src/osgPlugins/cfg/CMakeLists.txt
index 972675f..4f7062b 100644
--- a/src/osgPlugins/cfg/CMakeLists.txt
+++ b/src/osgPlugins/cfg/CMakeLists.txt
@@ -20,7 +20,7 @@ SET(TARGET_H
# lex/yacc generated files use register that causes warnings with CLang under OSX so disable this warnings.
IF(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
- SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -Wno-deprecated-register)
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-register")
ENDIF()
#

View File

@ -0,0 +1,11 @@
--- OpenSceneGraph-OpenSceneGraph-3.5.5/src/osgPlugins/3ds/ReaderWriter3DS.cpp 2017-02-24 13:09:52.785969600 +0100
+++ OpenSceneGraph-OpenSceneGraph-3.5.5/src/osgPlugins/3ds/ReaderWriter3DS.cpp.orig 2017-02-24 13:01:55.130353400 +0100
@@ -619,7 +619,7 @@
{
// add our geometry to group (where our children already are)
// creates geometry under modifier node
- processMesh(drawStateMap,group,mesh,meshAppliedMatPtr);
+ processMesh(drawStateMap,meshTransform,mesh,meshAppliedMatPtr);
return group;
}
else

View File

@ -1,66 +0,0 @@
diff --git a/src/osgEarth/ElevationQuery b/src/osgEarth/ElevationQuery
index d8e4d14..50db567 100644
--- a/src/osgEarth/ElevationQuery
+++ b/src/osgEarth/ElevationQuery
@@ -37,7 +37,11 @@ namespace osgEarth
void pruneUnusedDatabaseCache();
+#if OSG_VERSION_GREATER_OR_EQUAL(3,5,0)
+ virtual osg::ref_ptr<osg::Node> readNodeFile(const std::string& filename);
+#else
virtual osg::Node* readNodeFile(const std::string& filename);
+#endif
protected:
diff --git a/src/osgEarth/ElevationQuery.cpp b/src/osgEarth/ElevationQuery.cpp
index 5fb8222..8c03309 100644
--- a/src/osgEarth/ElevationQuery.cpp
+++ b/src/osgEarth/ElevationQuery.cpp
@@ -55,7 +55,11 @@ void ElevationQueryCacheReadCallback::pruneUnusedDatabaseCache()
{
}
+#if OSG_VERSION_GREATER_OR_EQUAL(3,5,0)
+osg::ref_ptr<osg::Node> ElevationQueryCacheReadCallback::readNodeFile(const std::string& filename)
+#else
osg::Node* ElevationQueryCacheReadCallback::readNodeFile(const std::string& filename)
+#endif
{
// first check to see if file is already loaded.
{
@@ -71,7 +75,7 @@ osg::Node* ElevationQueryCacheReadCallback::readNodeFile(const std::string& file
}
// now load the file.
- osg::ref_ptr<osg::Node> node = osgDB::readNodeFile(filename);
+ osg::ref_ptr<osg::Node> node = osgDB::readRefNodeFile(filename);
// insert into the cache.
if (node.valid())
@@ -105,7 +109,11 @@ osg::Node* ElevationQueryCacheReadCallback::readNodeFile(const std::string& file
}
}
+#if OSG_VERSION_GREATER_OR_EQUAL(3,5,0)
+ return node;
+#else
return node.release();
+#endif
}
ElevationQuery::ElevationQuery(const Map* map) :
diff --git a/src/osgEarthSymbology/Resource b/src/osgEarthSymbology/Resource
index a8a1441..934fc7d 100644
--- a/src/osgEarthSymbology/Resource
+++ b/src/osgEarthSymbology/Resource
@@ -33,7 +33,7 @@ namespace osgEarth { namespace Symbology
class OSGEARTHSYMBOLOGY_EXPORT Resource : public Taggable<osg::Object>
{
protected:
- Resource(const Resource& rhs,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY) {};
+ Resource(const Resource& rhs,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY) : Taggable() {};
Resource( const Config& config =Config() );
/** dtor */

View File

@ -0,0 +1,80 @@
From 2a0f721b58a3280f151df095ef6cb8a9f063ba25 Mon Sep 17 00:00:00 2001
From: Philippe Renon <philippe_renon@yahoo.fr>
Date: Fri, 13 Jan 2017 15:13:54 +0100
Subject: [PATCH] support geos 3.6.1
---
src/osgEarthSymbology/GEOS | 3 ++-
src/osgEarthSymbology/GEOS.cpp | 13 ++-----------
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/src/osgEarthSymbology/GEOS b/src/osgEarthSymbology/GEOS
index b695bb7de..0184f6422 100644
--- a/src/osgEarthSymbology/GEOS
+++ b/src/osgEarthSymbology/GEOS
@@ -26,6 +26,7 @@
#include <osgEarthSymbology/Style>
#include <osgEarthSymbology/Geometry>
#include <geos/geom/Geometry.h>
+#include <geos/geom/GeometryFactory.h>
namespace osgEarth { namespace Symbology
{
@@ -45,7 +46,7 @@ namespace osgEarth { namespace Symbology
void disposeGeometry(geos::geom::Geometry* input);
protected:
- geos::geom::GeometryFactory* _factory;
+ geos::geom::GeometryFactory::unique_ptr _factory;
};
} } // namespace osgEarth::Features
diff --git a/src/osgEarthSymbology/GEOS.cpp b/src/osgEarthSymbology/GEOS.cpp
index cf04e3309..d87bf461f 100644
--- a/src/osgEarthSymbology/GEOS.cpp
+++ b/src/osgEarthSymbology/GEOS.cpp
@@ -212,7 +212,7 @@ GEOSContext::GEOSContext()
geos::geom::PrecisionModel* pm = new geos::geom::PrecisionModel(geom::PrecisionModel::FLOATING);
// Factory will clone the PM
- _factory = new geos::geom::GeometryFactory( pm );
+ _factory = geos::geom::GeometryFactory::create( pm );
// Delete the template.
delete pm;
@@ -220,7 +220,6 @@ GEOSContext::GEOSContext()
GEOSContext::~GEOSContext()
{
- delete _factory;
}
geom::Geometry*
@@ -229,12 +228,7 @@ GEOSContext::importGeometry(const Symbology::Geometry* input)
geom::Geometry* output = 0L;
if ( input && input->isValid() )
{
- output = import( input, _factory );
-
- // if output is ok, it will have a pointer to f. this is probably a leak.
- // TODO: Check whether this is a leak!! -gw
- //if ( !output )
- // delete f;
+ output = import( input, _factory.get() );
}
return output;
}
@@ -327,10 +321,7 @@ GEOSContext::disposeGeometry(geom::Geometry* input)
{
if (input)
{
- geom::GeometryFactory* f = const_cast<geom::GeometryFactory*>(input->getFactory());
_factory->destroyGeometry(input);
- if ( f != _factory )
- delete f;
}
}
--
2.12.0

View File

@ -0,0 +1,62 @@
From b69573f50496f9cdcad2bff5e5e25bf1ecea94e6 Mon Sep 17 00:00:00 2001
From: gwaldron <gwaldron@gmail.com>
Date: Mon, 17 Oct 2016 08:04:31 -0400
Subject: [PATCH] Removed/patched deprecated called to osg::Referenced
thread-safe reference counting
---
src/osgEarth/Locators.cpp | 4 ++--
src/osgEarth/Registry.cpp | 3 +++
src/osgEarth/TileSource.cpp | 2 --
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/osgEarth/Locators.cpp b/src/osgEarth/Locators.cpp
index fb3e825..fcb780c 100644
--- a/src/osgEarth/Locators.cpp
+++ b/src/osgEarth/Locators.cpp
@@ -29,7 +29,7 @@ _inverseCalculated(false),
_x0(0.0), _x1(1.0),
_y0(0.0), _y1(1.0)
{
- this->setThreadSafeRefUnref(true);
+ //nop
}
GeoLocator::GeoLocator( const GeoExtent& dataExtent ) :
@@ -38,7 +38,7 @@ _dataExtent( dataExtent ),
_x0(0.0), _x1(1.0),
_y0(0.0), _y1(1.0)
{
- this->setThreadSafeRefUnref(true);
+ //nop
}
GeoLocator::GeoLocator( const osgTerrain::Locator& prototype, const GeoExtent& dataExtent ) :
diff --git a/src/osgEarth/Registry.cpp b/src/osgEarth/Registry.cpp
index 32a9439..bf95e87 100644
--- a/src/osgEarth/Registry.cpp
+++ b/src/osgEarth/Registry.cpp
@@ -694,7 +694,10 @@ class RegisterEarthTileExtension
public:
RegisterEarthTileExtension()
{
+#if OSG_VERSION_LESS_THAN(3,5,4)
+ // Method deprecated beyone 3.5.4 since all ref counting is thread-safe by default
osg::Referenced::setThreadSafeReferenceCounting( true );
+#endif
osgDB::Registry::instance()->addFileExtensionAlias("earth_tile", "earth");
}
};
diff --git a/src/osgEarth/TileSource.cpp b/src/osgEarth/TileSource.cpp
index fcdf2b8..28c6f61 100644
--- a/src/osgEarth/TileSource.cpp
+++ b/src/osgEarth/TileSource.cpp
@@ -218,8 +218,6 @@ _status ( Status::Error("Not initialized") ),
_mode ( 0 ),
_openCalled( false )
{
- this->setThreadSafeRefUnref( true );
-
// Initialize the l2 cache size to the options.
int l2CacheSize = *options.L2CacheSize();

View File

@ -23,7 +23,7 @@
OSG_BUILD_CONF := Release
OSG_NAME_PREFIX :=
OSG_NAME_SUFIX := -qt-$(QT_VERSION)
OSG_NAME_SUFIX :=
################################
#
@ -31,7 +31,7 @@ OSG_NAME_SUFIX := -qt-$(QT_VERSION)
#
################################
OSG_VERSION := 3.5.3
OSG_VERSION := 3.5.5
OSG_GIT_TAG := OpenSceneGraph-$(OSG_VERSION)
OSG_BASE_NAME := osg-$(OSG_VERSION)
@ -45,14 +45,11 @@ ifeq ($(UNAME), Linux)
OSG_CMAKE_GENERATOR := "Unix Makefiles"
OSG_CMAKE_MAKE_PROGRAM := make
OSG_WINDOWING_SYSTEM := "X11"
# for some reason Qt is not added to the path in make/tools.mk
OSG_BUILD_PATH := $(QT_SDK_PREFIX)/bin:$(PATH)
else ifeq ($(UNAME), Darwin)
OSG_NAME := $(OSG_BASE_NAME)-clang_64
OSG_CMAKE_GENERATOR := "Unix Makefiles"
OSG_CMAKE_MAKE_PROGRAM := make
OSG_WINDOWING_SYSTEM := "Cocoa"
OSG_BUILD_PATH := $(QT_SDK_PREFIX)/bin:$(PATH)
else ifeq ($(UNAME), Windows)
OSG_NAME := $(OSG_BASE_NAME)-$(QT_SDK_ARCH)
OSG_CMAKE_GENERATOR := "MinGW Makefiles"
@ -62,7 +59,6 @@ OSG_NAME := $(OSG_NAME_PREFIX)$(OSG_NAME)$(OSG_NAME_SUFIX)
OSG_SRC_DIR := $(ROOT_DIR)/3rdparty/osg
OSG_BUILD_DIR := $(BUILD_DIR)/3rdparty/$(OSG_NAME)
OSG_INSTALL_DIR := $(BUILD_DIR)/3rdparty/install/$(OSG_NAME)
OSG_PATCH_FILE := $(ROOT_DIR)/make/3rdparty/osgearth/osg-$(OSG_VERSION).patch
.PHONY: osg
osg:
@ -74,17 +70,15 @@ osg:
fi ; \
$(CMAKE) -G $(OSG_CMAKE_GENERATOR) -DCMAKE_BUILD_TYPE=$(OSG_BUILD_CONF) \
-DCMAKE_MAKE_PROGRAM=$(MAKE) \
-DOSG_USE_QT=ON \
-DBUILD_OSG_APPLICATIONS=ON \
-DBUILD_OSG_EXAMPLES=OFF \
-DBUILD_OPENTHREADS_WITH_QT=OFF \
-DOSG_GL3_AVAILABLE=OFF \
-DOSG_PLUGIN_SEARCH_INSTALL_DIR_FOR_PLUGINS=OFF \
-DCMAKE_OSX_ARCHITECTURES="x86_64" \
-DOSG_WINDOWING_SYSTEM=$(OSG_WINDOWING_SYSTEM) \
-DCMAKE_INSTALL_NAME_DIR=@executable_path/../Plugins \
-DCMAKE_INSTALL_PREFIX=$(OSG_INSTALL_DIR) $(OSG_SRC_DIR) && \
$(MAKE) && \
$(MAKE) -j3 && \
$(MAKE) install ; \
)
@ -99,34 +93,6 @@ package_osg:
$(call MD5_GEN_TEMPLATE,$(notdir $(OSG_INSTALL_DIR)).tar.gz) ; \
)
.PHONY: install_win_osg
install_win_osg:
# curl
$(V1) $(CP) /mingw32/bin/libcurl-4.dll $(OSG_INSTALL_DIR)/bin/
$(V1) $(CP) /mingw32/bin/libidn-11.dll $(OSG_INSTALL_DIR)/bin/
$(V1) $(CP) /mingw32/bin/librtmp-1.dll $(OSG_INSTALL_DIR)/bin/
$(V1) $(CP) /mingw32/bin/libgmp-10.dll $(OSG_INSTALL_DIR)/bin/
$(V1) $(CP) /mingw32/bin/libgnutls-30.dll $(OSG_INSTALL_DIR)/bin/
$(V1) $(CP) /mingw32/bin/libp11-kit-0.dll $(OSG_INSTALL_DIR)/bin/
$(V1) $(CP) /mingw32/bin/libffi-6.dll $(OSG_INSTALL_DIR)/bin/
$(V1) $(CP) /mingw32/bin/libtasn1-6.dll $(OSG_INSTALL_DIR)/bin/
$(V1) $(CP) /mingw32/bin/libhogweed-4-1.dll $(OSG_INSTALL_DIR)/bin/
$(V1) $(CP) /mingw32/bin/libnettle-6-1.dll $(OSG_INSTALL_DIR)/bin/
$(V1) $(CP) /mingw32/bin/libssh2-1.dll $(OSG_INSTALL_DIR)/bin/
# gdal
$(V1) $(CP) /mingw32/bin/libgdal-20.dll $(OSG_INSTALL_DIR)/bin/
$(V1) $(CP) /mingw32/bin/libgeos_c.dll $(OSG_INSTALL_DIR)/bin/
$(V1) $(CP) /mingw32/bin/libgeos.dll $(OSG_INSTALL_DIR)/bin/
$(V1) $(CP) /mingw32/bin/libjpeg-8.dll $(OSG_INSTALL_DIR)/bin/
$(V1) $(CP) /mingw32/bin/libtiff-5.dll $(OSG_INSTALL_DIR)/bin/
$(V1) $(CP) /mingw32/bin/liblzma-5.dll $(OSG_INSTALL_DIR)/bin/
$(V1) $(CP) /mingw32/bin/libiconv-2.dll $(OSG_INSTALL_DIR)/bin/
$(V1) $(CP) /mingw32/bin/zlib1.dll $(OSG_INSTALL_DIR)/bin/
# other
$(V1) $(CP) /mingw32/bin/libproj-9.dll $(OSG_INSTALL_DIR)/bin/
$(V1) $(CP) /mingw32/bin/libfreetype-6.dll $(OSG_INSTALL_DIR)/bin/
$(V1) $(CP) /mingw32/bin/libpng16-16.dll $(OSG_INSTALL_DIR)/bin/
.NOTPARALLEL:
.PHONY: prepare_osg
prepare_osg: clone_osg
@ -141,10 +107,7 @@ clone_osg:
$(V1) $(GIT) clone --depth 1 --no-checkout -b $(OSG_GIT_TAG) git://github.com/openscenegraph/osg.git $(OSG_SRC_DIR)
@$(ECHO) "Checkout osg $(OSG_GIT_TAG)"
$(V1) ( $(CD) $(OSG_SRC_DIR) && $(GIT) checkout --force tags/$(OSG_GIT_TAG) ; )
$(V1) if [ -e $(OSG_PATCH_FILE) ]; then \
$(ECHO) "Patching osg..." ; \
( $(CD) $(OSG_SRC_DIR) && $(GIT) apply $(OSG_PATCH_FILE) ; ) \
fi
$(V1) ( $(CD) $(OSG_SRC_DIR) && $(GIT) apply $(ROOT_DIR)/make/3rdparty/osgearth/osg-fix-3ds-plugin.patch ; )
.PHONY: clean_osg
clean_osg:
@ -168,7 +131,7 @@ clean_all_osg: clean_osg
# fix Debug build
# add option to not build the applications (in Debug mode in particular)
OSGEARTH_VERSION := 2.7
OSGEARTH_VERSION := 2.8
OSGEARTH_GIT_TAG := osgearth-$(OSGEARTH_VERSION)
OSGEARTH_BASE_NAME := osgearth-$(OSGEARTH_VERSION)
@ -184,8 +147,7 @@ ifeq ($(UNAME), Linux)
endif
OSGEARTH_CMAKE_GENERATOR := "Unix Makefiles"
OSGEARTH_CMAKE_MAKE_PROGRAM := make
# for some reason Qt is not added to the path in make/tools.mk
OSGEARTH_BUILD_PATH := $(QT_SDK_PREFIX)/bin:$(OSG_INSTALL_DIR)/bin:$(PATH)
OSGEARTH_BUILD_PATH := $(OSG_INSTALL_DIR)/bin:$(PATH)
ifeq ($(ARCH), x86_64)
OSGEARTH_LIB_PATH := $(OSG_INSTALL_DIR)/lib64
else
@ -195,7 +157,7 @@ else ifeq ($(UNAME), Darwin)
OSGEARTH_NAME := $(OSGEARTH_BASE_NAME)-clang_64
OSGEARTH_CMAKE_GENERATOR := "Unix Makefiles"
OSGEARTH_CMAKE_MAKE_PROGRAM := make
OSGEARTH_BUILD_PATH := $(QT_SDK_PREFIX)/bin:$(OSG_INSTALL_DIR)/bin:$(PATH)
OSGEARTH_BUILD_PATH := $(OSG_INSTALL_DIR)/bin:$(PATH)
OSGEARTH_LIB_PATH := $(OSG_INSTALL_DIR)/lib
else ifeq ($(UNAME), Windows)
OSGEARTH_NAME := $(OSGEARTH_BASE_NAME)-$(QT_SDK_ARCH)
@ -207,7 +169,6 @@ OSGEARTH_NAME := $(OSG_NAME_PREFIX)$(OSGEARTH_NAME)$(OSG_NAME_SUFIX)
OSGEARTH_SRC_DIR := $(ROOT_DIR)/3rdparty/osgearth
OSGEARTH_BUILD_DIR := $(BUILD_DIR)/3rdparty/$(OSGEARTH_NAME)
OSGEARTH_INSTALL_DIR := $(BUILD_DIR)/3rdparty/install/$(OSGEARTH_NAME)
OSGEARTH_PATCH_FILE := $(ROOT_DIR)/make/3rdparty/osgearth/osgearth-$(OSGEARTH_VERSION).patch
.PHONY: osgearth
osgearth:
@ -222,7 +183,7 @@ osgearth:
unset OSG_NOTIFY_LEVEL && \
$(CMAKE) -G $(OSGEARTH_CMAKE_GENERATOR) -DCMAKE_BUILD_TYPE=$(OSGEARTH_BUILD_CONF) \
-DCMAKE_MAKE_PROGRAM=$(MAKE) \
-DOSGEARTH_USE_QT=ON \
-DOSGEARTH_USE_QT=OFF \
-DINSTALL_TO_OSG_DIR=OFF \
-DOSG_DIR=$(OSG_INSTALL_DIR) \
-DCMAKE_INCLUDE_PATH=$(OSG_INSTALL_DIR)/include \
@ -231,7 +192,7 @@ osgearth:
-DCMAKE_OSX_ARCHITECTURES="x86_64" \
-DCMAKE_INSTALL_NAME_DIR=@executable_path/../Plugins \
-DCMAKE_INSTALL_PREFIX=$(OSGEARTH_INSTALL_DIR) $(OSGEARTH_SRC_DIR) && \
$(MAKE) && \
$(MAKE) -j3 && \
$(MAKE) install ; \
)
@ -259,10 +220,8 @@ clone_osgearth:
$(V1) $(GIT) clone --depth 1 --no-checkout -b $(OSGEARTH_GIT_TAG) git://github.com/gwaldron/osgearth.git $(OSGEARTH_SRC_DIR)
@$(ECHO) "Checkout osgearth $(OSGEARTH_GIT_TAG)"
$(V1) ( $(CD) $(OSGEARTH_SRC_DIR) && $(GIT) checkout --force tags/$(OSGEARTH_GIT_TAG) ; )
$(V1) if [ -e $(OSGEARTH_PATCH_FILE) ]; then \
$(ECHO) "Patching osgearth..." ; \
( $(CD) $(OSGEARTH_SRC_DIR) && $(GIT) apply $(OSGEARTH_PATCH_FILE) ; ) \
fi
$(V1) ( $(CD) $(OSGEARTH_SRC_DIR) && $(GIT) apply $(ROOT_DIR)/make/3rdparty/osgearth/osgearth-remove-deprecated-call.patch ; )
$(V1) ( $(CD) $(OSGEARTH_SRC_DIR) && $(GIT) apply $(ROOT_DIR)/make/3rdparty/osgearth/osgearth-geos-3_6_1-support.patch ; )
.PHONY: clean_osgearth
clean_osgearth:
@ -284,9 +243,4 @@ clean_all_osgearth: clean_osgearth
.NOTPARALLEL:
.PHONY: all_osg
ifeq ($(UNAME), Windows)
all_osg: prepare_osg prepare_osgearth osg osgearth install_win_osg package_osg package_osgearth
else
all_osg: prepare_osg prepare_osgearth osg osgearth package_osg package_osgearth
endif