1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-15 07:29:15 +01:00

LP-29 switch to using tags instead of branches...

so now using osg 3.4.0 and osgearth 2.7 tags (instead of 3.4 and 2.7 branches)
also do shallow clone to save on band width and disk space
This commit is contained in:
Philippe Renon 2016-02-07 14:14:48 +01:00 committed by Philippe Renon
parent 37d0ab4056
commit b1292a695b
4 changed files with 106 additions and 38 deletions

24
make/3rdparty/osgearth/osg-3.4.0.patch vendored Normal file
View File

@ -0,0 +1,24 @@
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,3 +1,56 @@
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

View File

@ -31,12 +31,8 @@ OSG_NAME_SUFIX := -qt-$(QT_VERSION)
#
################################
#OSG_VERSION := 0b63c8ffde
#OSG_GIT_BRANCH := $(OSG_VERSION)
#OSG_VERSION := 3.4.0-rc5
#OSG_GIT_BRANCH := tags/OpenSceneGraph-$(OSG_VERSION)
OSG_VERSION := 3.4
OSG_GIT_BRANCH := OpenSceneGraph-$(OSG_VERSION)
OSG_VERSION := 3.4.0
OSG_GIT_TAG := OpenSceneGraph-$(OSG_VERSION)
OSG_BASE_NAME := osg-$(OSG_VERSION)
@ -137,15 +133,14 @@ prepare_osg: clone_osg
.PHONY: clone_osg
clone_osg:
$(V1) if [ ! -d "$(OSG_SRC_DIR)" ]; then \
$(ECHO) "Cloning osg..." ; \
$(GIT) clone --no-checkout git://github.com/openscenegraph/osg.git $(OSG_SRC_DIR) ; \
$(V1) if [ -d "$(OSG_SRC_DIR)" ]; then \
$(ECHO) "Deleting osg clone..." ; \
$(RM) -rf $(OSG_SRC_DIR) ; \
fi
@$(ECHO) "Fetching osg..."
$(V1) ( $(CD) $(OSG_SRC_DIR) && $(GIT) fetch ; )
@$(ECHO) "Checking out osg $(OSG_GIT_BRANCH)"
$(V1) ( $(CD) $(OSG_SRC_DIR) && $(GIT) fetch --tags ; )
$(V1) ( $(CD) $(OSG_SRC_DIR) && $(GIT) checkout --quiet --force $(OSG_GIT_BRANCH) ; )
@$(ECHO) "Cloning 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) ; ) \
@ -173,17 +168,14 @@ clean_all_osg: clean_osg
# fix Debug build
# add option to not build the applications (in Debug mode in particular)
#OSGEARTH_VERSION := 1873b3a9489
#OSGEARTH_GIT_BRANCH := $(OSGEARTH_VERSION)
OSGEARTH_VERSION := 2.7
OSGEARTH_GIT_BRANCH := osgearth-$(OSGEARTH_VERSION)
OSGEARTH_VERSION := 2.7
OSGEARTH_GIT_TAG := osgearth-$(OSGEARTH_VERSION)
OSGEARTH_BASE_NAME := osgearth-$(OSGEARTH_VERSION)
OSGEARTH_BUILD_CONF := $(OSG_BUILD_CONF)
# osgearth cmake script calls the osgversion executable to find the osg version
# this makes it necessary to have osg in the pathes (bin and lib) to make sure the correct one is found
# ideally this should not be necessary
# this makes it necessary to have osg in the path (bin and lib) to make sure the correct one is found
ifeq ($(UNAME), Linux)
ifeq ($(ARCH), x86_64)
OSGEARTH_NAME := $(OSGEARTH_BASE_NAME)-linux-x64
@ -259,16 +251,15 @@ prepare_osgearth: clone_osgearth
.PHONY: clone_osgearth
clone_osgearth:
$(V1) if [ ! -d "$(OSGEARTH_SRC_DIR)" ]; then \
$(ECHO) "Cloning osgearth..." ; \
$(GIT) clone --no-checkout git://github.com/gwaldron/osgearth.git $(OSGEARTH_SRC_DIR) ; \
$(V1) if [ -d "$(OSGEARTH_SRC_DIR)" ]; then \
$(ECHO) "Deleting osgearth clone..." ; \
$(RM) -rf $(OSGEARTH_SRC_DIR) ; \
fi
@$(ECHO) "Fetching osgearth..."
$(V1) ( $(CD) $(OSGEARTH_SRC_DIR) && $(GIT) fetch ; )
@$(ECHO) "Checking out osgearth $(OSGEARTH_GIT_BRANCH)"
$(V1) ( $(CD) $(OSGEARTH_SRC_DIR) && $(GIT) fetch --tags ; )
$(V1) ( $(CD) $(OSGEARTH_SRC_DIR) && $(GIT) checkout --quiet --force $(OSGEARTH_GIT_BRANCH) ; )
$(V1) if [ -f "$(OSGEARTH_PATCH_FILE)" ]; then \
@$(ECHO) "Cloning 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

View File

@ -89,13 +89,13 @@ ifeq ($(UNAME), Linux)
QT_SDK_ARCH := gcc_64
QT_SDK_URL := http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-linux-x64-5.5.1.run
QT_SDK_MD5_URL := http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-linux-x64-5.5.1.run.md5
OSG_URL := http://librepilot.github.io/tools/osg-3.4-linux-x64-qt-5.5.1.tar.gz
OSG_URL := http://librepilot.github.io/tools/osg-3.4.0-linux-x64-qt-5.5.1.tar.gz
OSGEARTH_URL := http://librepilot.github.io/tools/osgearth-2.7-linux-x64-qt-5.5.1.tar.gz
else
QT_SDK_ARCH := gcc
QT_SDK_URL := http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-linux-x86-5.5.1.run
QT_SDK_MD5_URL := http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-linux-x86-5.5.1.run.md5
OSG_URL := http://librepilot.github.io/tools/osg-3.4-linux-x86-qt-5.5.1.tar.gz
OSG_URL := http://librepilot.github.io/tools/osg-3.4.0-linux-x86-qt-5.5.1.tar.gz
OSGEARTH_URL := http://librepilot.github.io/tools/osgearth-2.7-linux-x86-qt-5.5.1.tar.gz
endif
UNCRUSTIFY_URL := http://librepilot.github.io/tools/uncrustify-0.60.tar.gz
@ -108,7 +108,7 @@ else ifeq ($(UNAME), Darwin)
QT_SDK_MAINTENANCE_TOOL := /Volumes/qt-opensource-mac-x64-clang-5.5.1/qt-opensource-mac-x64-clang-5.5.1.app/Contents/MacOS/qt-opensource-mac-x64-clang-5.5.1
UNCRUSTIFY_URL := http://librepilot.github.io/tools/uncrustify-0.60.tar.gz
DOXYGEN_URL := http://librepilot.github.io/tools/doxygen-1.8.3.1.src.tar.gz
OSG_URL := http://librepilot.github.io/tools/osg-3.4-clang_64-qt-5.5.1.tar.gz
OSG_URL := http://librepilot.github.io/tools/osg-3.4.0-clang_64-qt-5.5.1.tar.gz
OSGEARTH_URL := http://librepilot.github.io/tools/osgearth-2.7-clang_64-qt-5.5.1.tar.gz
else ifeq ($(UNAME), Windows)
QT_SDK_ARCH := mingw492_32
@ -134,15 +134,15 @@ OSG_TOOLS_DIR := $(TOOLS_DIR)
ifeq ($(UNAME), Linux)
ifeq ($(ARCH), x86_64)
OSG_SDK_DIR := $(OSG_TOOLS_DIR)/osg-3.4-linux-x64-qt-$(QT_VERSION)
OSGEARTH_SDK_DIR := $(OSG_TOOLS_DIR)/osgearth-2.7-linux-x64-qt-$(QT_VERSION)
OSG_SDK_DIR := $(OSG_TOOLS_DIR)/osg-3.4.0-linux-x64-qt-5.5.1
OSGEARTH_SDK_DIR := $(OSG_TOOLS_DIR)/osgearth-2.7-linux-x64-qt-5.5.1
else
OSG_SDK_DIR := $(OSG_TOOLS_DIR)/osg-3.4-linux-x86-qt-$(QT_VERSION)
OSGEARTH_SDK_DIR := $(OSG_TOOLS_DIR)/osgearth-2.7-linux-x86-qt-$(QT_VERSION)
OSG_SDK_DIR := $(OSG_TOOLS_DIR)/osg-3.4.0-linux-x86-qt-5.5.1
OSGEARTH_SDK_DIR := $(OSG_TOOLS_DIR)/osgearth-2.7-linux-x86-qt-5.5.1
endif
else ifeq ($(UNAME), Darwin)
OSG_SDK_DIR := $(OSG_TOOLS_DIR)/osg-3.4-clang_64-qt-$(QT_VERSION)
OSGEARTH_SDK_DIR := $(OSG_TOOLS_DIR)/osgearth-2.7-clang_64-qt-$(QT_VERSION)
OSG_SDK_DIR := $(OSG_TOOLS_DIR)/osg-3.4.0-clang_64-qt-5.5.1
OSGEARTH_SDK_DIR := $(OSG_TOOLS_DIR)/osgearth-2.7-clang_64-qt-5.5.1
else ifeq ($(UNAME), Windows)
MINGW_DIR := $(QT_SDK_DIR)/Tools/$(QT_SDK_ARCH)
# When changing PYTHON_DIR, you must also update it in ground/gcs/src/python.pri