From 54edce6e1c6c9d966ff33eb568d929ccdb7786c3 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sat, 5 Sep 2015 19:08:55 +0200 Subject: [PATCH 01/21] LP-30 added build scripts for osg (including windows dependencies), osgearth and marble --- make/3rdparty/3rdparty.mk | 2 + make/3rdparty/marble/marble.mk | 160 ++++++++ .../osgearth/gdal_GNUmakefile_fix.diff | 48 +++ make/3rdparty/osgearth/osgearth.mk | 326 ++++++++++++++++ .../osgearth/osgearth_dependencies_win.sh | 348 ++++++++++++++++++ 5 files changed, 884 insertions(+) create mode 100644 make/3rdparty/3rdparty.mk create mode 100644 make/3rdparty/marble/marble.mk create mode 100644 make/3rdparty/osgearth/gdal_GNUmakefile_fix.diff create mode 100644 make/3rdparty/osgearth/osgearth.mk create mode 100644 make/3rdparty/osgearth/osgearth_dependencies_win.sh diff --git a/make/3rdparty/3rdparty.mk b/make/3rdparty/3rdparty.mk new file mode 100644 index 000000000..8e259e7c2 --- /dev/null +++ b/make/3rdparty/3rdparty.mk @@ -0,0 +1,2 @@ +-include $(ROOT_DIR)/make/3rdparty/osgearth/osgearth.mk +-include $(ROOT_DIR)/make/3rdparty/marble/marble.mk diff --git a/make/3rdparty/marble/marble.mk b/make/3rdparty/marble/marble.mk new file mode 100644 index 000000000..2f3d29c09 --- /dev/null +++ b/make/3rdparty/marble/marble.mk @@ -0,0 +1,160 @@ +################################ +# Targets to build Marble +# +################################ +# Linux prerequisites +################################ +# +# +################################ +# Windows prerequisites +################################ +# +# +################################ +# Building +################################ +# +# $ make all_marble +# +################################ + +# TODO should be discovered +QT_VERSION := 5.4.1 + +MARBLE_NAME_PREFIX := +MARBLE_NAME_SUFIX := -qt-$(QT_VERSION) + +################################ +# +# Marble +# +################################ + +MARBLE_VERSION := master +MARBLE_GIT_BRANCH := $(MARBLE_VERSION) + +MARBLE_BASE_NAME := marble-$(MARBLE_VERSION) +MARBLE_BUILD_CONF := Release + +ifeq ($(UNAME), Linux) + ifeq ($(ARCH), x86_64) + MARBLE_NAME := $(MARBLE_BASE_NAME)-linux-x64 + else + MARBLE_NAME := $(MARBLE_BASE_NAME)-linux-x86 + endif + MARBLE_DATA_BASE_DIR := share/marble/data + MARBLE_CMAKE_GENERATOR := "Unix Makefiles" + # for some reason Qt is not added to the path in make/tools.mk + MARBLE_BUILD_PATH := $(QT_SDK_PREFIX)/bin:$(PATH) +else ifeq ($(UNAME), Darwin) + MARBLE_NAME := $(MARBLE_BASE_NAME)-clang_64 + MARBLE_DATA_BASE_DIR := share/marble/data + MARBLE_CMAKE_GENERATOR := "Unix Makefiles" + # for some reason Qt is not added to the path in make/tools.mk + MARBLE_BUILD_PATH := $(QT_SDK_PREFIX)/bin:$(PATH) +else ifeq ($(UNAME), Windows) + MARBLE_NAME := $(MARBLE_BASE_NAME)-$(QT_SDK_ARCH) + MARBLE_DATA_BASE_DIR := data + MARBLE_CMAKE_GENERATOR := "MinGW Makefiles" + # CMake is quite picky about its PATH and will complain if sh.exe is found in it + MARBLE_BUILD_PATH := "$(TOOLS_DIR)/bin;$(QT_SDK_PREFIX)/bin;$(MINGW_DIR)/bin;$$SYSTEMROOT/System32" +endif + +MARBLE_NAME := $(MARBLE_NAME_PREFIX)$(MARBLE_NAME)$(MARBLE_NAME_SUFIX) +MARBLE_SRC_DIR := $(ROOT_DIR)/3rdparty/marble +MARBLE_BUILD_DIR := $(BUILD_DIR)/3rdparty/$(MARBLE_NAME) +MARBLE_INSTALL_DIR := $(BUILD_DIR)/3rdparty/install/$(MARBLE_NAME) +MARBLE_DATA_DIR := $(MARBLE_INSTALL_DIR)/$(MARBLE_DATA_BASE_DIR) +MARBLE_PATCH_FILE := $(ROOT_DIR)/make/3rdparty/marble-$(MARBLE_VERSION)_patch.diff + +.PHONY: marble +marble: + @$(ECHO) "Building marble $(call toprel, $(MARBLE_SRC_DIR)) into $(call toprel, $(MARBLE_BUILD_DIR))" + $(V1) $(MKDIR) -p $(MARBLE_BUILD_DIR) + $(V1) ( $(CD) $(MARBLE_BUILD_DIR) && \ + PATH=$(MARBLE_BUILD_PATH) && \ + $(CMAKE) -G $(MARBLE_CMAKE_GENERATOR) -DCMAKE_BUILD_TYPE=$(MARBLE_BUILD_CONF) \ + -DQTONLY=1 -DQT5BUILD=1 -DWITH_DESIGNER_PLUGIN=0 \ + -DCMAKE_INSTALL_PREFIX=$(MARBLE_INSTALL_DIR) $(MARBLE_SRC_DIR) && \ + $(MAKE) && \ + $(MAKE) install ; \ + ) + @$(ECHO) "Copying restricted maps to $(call toprel, $(MARBLE_DATA_DIR))" + @$(ECHO) "Copying Google Maps" + $(V1) $(MKDIR) -p $(MARBLE_DATA_DIR)/maps/earth/googlemaps + $(V1) $(CP) $(MARBLE_SRC_DIR)/googlemaps/googlemaps.dgml $(MARBLE_DATA_DIR)/maps/earth/googlemaps/ + $(V1) $(CP) $(MARBLE_SRC_DIR)/googlemaps/preview.png $(MARBLE_DATA_DIR)/maps/earth/googlemaps/ + $(V1) $(CP) -R $(MARBLE_SRC_DIR)/googlemaps/0 $(MARBLE_DATA_DIR)/maps/earth/googlemaps/ + @$(ECHO) "Copying Google Sat" + $(V1) $(MKDIR) -p $(MARBLE_DATA_DIR)/maps/earth/googlesat + $(V1) $(CP) $(MARBLE_SRC_DIR)/googlesat/googlesat.dgml $(MARBLE_DATA_DIR)/maps/earth/googlesat/ + $(V1) $(CP) $(MARBLE_SRC_DIR)/googlesat/preview.png $(MARBLE_DATA_DIR)/maps/earth/googlesat/ + $(V1) $(CP) -R $(MARBLE_SRC_DIR)/googlesat/0 $(MARBLE_DATA_DIR)/maps/earth/googlesat/ + $(V1) $(CP) -R $(MARBLE_SRC_DIR)/googlesat/bicycle $(MARBLE_DATA_DIR)/maps/earth/googlesat/ + $(V1) $(CP) -R $(MARBLE_SRC_DIR)/googlesat/streets $(MARBLE_DATA_DIR)/maps/earth/googlesat/ + +.PHONY: package_marble +package_marble: + @$(ECHO) "Packaging $(call toprel, $(MARBLE_INSTALL_DIR)) into $(notdir $(MARBLE_INSTALL_DIR)).tar" + $(V1) $(CP) $(ROOT_DIR)/make/3rdparty/OpenPilotReadme.txt $(MARBLE_INSTALL_DIR)/ + $(V1) ( \ + $(CD) $(MARBLE_INSTALL_DIR)/.. && \ + $(TAR) cf $(notdir $(MARBLE_INSTALL_DIR)).tar $(notdir $(MARBLE_INSTALL_DIR)) && \ + $(ZIP) -f $(notdir $(MARBLE_INSTALL_DIR)).tar && \ + $(call MD5_GEN_TEMPLATE,$(notdir $(MARBLE_INSTALL_DIR)).tar.gz) ; \ + ) + +.NOTPARALLEL: +.PHONY: prepare_marble +prepare_marble: clone_marble + +.PHONY: clone_marble +clone_marble: + $(V1) if [ ! -d "$(MARBLE_SRC_DIR)" ]; then \ + $(ECHO) "Cloning marble..." ; \ + $(GIT) clone --no-checkout git://anongit.kde.org/marble $(MARBLE_SRC_DIR) ; \ + fi + @$(ECHO) "Fetching marble..." + $(V1) ( $(CD) $(MARBLE_SRC_DIR) && $(GIT) fetch ; ) + @$(ECHO) "Checking out marble branch $(MARBLE_GIT_BRANCH)" + $(V1) ( $(CD) $(MARBLE_SRC_DIR) && $(GIT) checkout --quiet --force $(MARBLE_GIT_BRANCH) ; ) + $(V1) if [ -e $(MARBLE_PATCH_FILE) ]; then \ + $(ECHO) "Patching marble..." ; \ + ( $(CD) $(MARBLE_SRC_DIR) && $(GIT) apply $(MARBLE_PATCH_FILE) ; ) \ + fi + + $(V1) if [ ! -d "$(MARBLE_SRC_DIR)/googlemaps" ]; then \ + $(ECHO) "Cloning googlemaps to $(call toprel, $(MARBLE_SRC_DIR)/googlemaps)" ; \ + $(GIT) clone https://gitorious.org/marble-restricted-maps/googlemaps.git $(MARBLE_SRC_DIR)/googlemaps ; \ + fi + @$(ECHO) "Fetching googlemaps..." + $(V1) ( $(CD) $(MARBLE_SRC_DIR)/googlemaps && $(GIT) fetch ; ) + @$(ECHO) "Checking out googlemaps" + $(V1) ( $(CD) $(MARBLE_SRC_DIR)/googlemaps && $(GIT) checkout --quiet --force master ; ) + + $(V1) if [ ! -d "$(MARBLE_SRC_DIR)/googlesat" ]; then \ + $(ECHO) "Cloning googlesat to $(call toprel, $(MARBLE_SRC_DIR)/googlesat)" ; \ + $(GIT) clone https://gitorious.org/marble-restricted-maps/googlesat.git $(MARBLE_SRC_DIR)/googlesat ; \ + fi + @$(ECHO) "Fetching googlesat..." + $(V1) ( $(CD) $(MARBLE_SRC_DIR)/googlesat && $(GIT) fetch ; ) + @$(ECHO) "Checking out googlesat" + $(V1) ( $(CD) $(MARBLE_SRC_DIR)/googlesat && $(GIT) checkout --quiet --force master ; ) + +.PHONY: clean_marble +clean_marble: + @$(ECHO) $(MSG_CLEANING) $(call toprel, $(MARBLE_BUILD_DIR)) + $(V1) [ ! -d "$(MARBLE_BUILD_DIR)" ] || $(RM) -r "$(MARBLE_BUILD_DIR)" + @$(ECHO) $(MSG_CLEANING) $(call toprel, $(MARBLE_INSTALL_DIR)) + $(V1) [ ! -d "$(MARBLE_INSTALL_DIR)" ] || $(RM) -r "$(MARBLE_INSTALL_DIR)" + +.PHONY: clean_all_marble +clean_all_marble: clean_marble + @$(ECHO) $(MSG_CLEANING) $(call toprel, $(MARBLE_SRC_DIR)) + $(V1) [ ! -d "$(MARBLE_SRC_DIR)" ] || $(RM) -r "$(MARBLE_SRC_DIR)" + +.NOTPARALLEL: +.PHONY: all_marble +all_marble: prepare_marble marble package_marble + diff --git a/make/3rdparty/osgearth/gdal_GNUmakefile_fix.diff b/make/3rdparty/osgearth/gdal_GNUmakefile_fix.diff new file mode 100644 index 000000000..98f41527f --- /dev/null +++ b/make/3rdparty/osgearth/gdal_GNUmakefile_fix.diff @@ -0,0 +1,48 @@ +Index: GNUmakefile +=================================================================== +--- GNUmakefile (revision 22722) ++++ GNUmakefile (copie de travail) +@@ -1,13 +1,13 @@ + + include GDALmake.opt + +-GDAL_OBJ = $(GDAL_ROOT)/frmts/o/*.o \ +- $(GDAL_ROOT)/gcore/*.o \ +- $(GDAL_ROOT)/port/*.o \ +- $(GDAL_ROOT)/alg/*.o ++GDAL_OBJ = ./frmts/o/*.o \ ++ ./gcore/*.o \ ++ ./port/*.o \ ++ ./alg/*.o + + ifeq ($(OGR_ENABLED),yes) +-GDAL_OBJ += $(GDAL_ROOT)/ogr/ogrsf_frmts/o/*.o ++GDAL_OBJ += ./ogr/ogrsf_frmts/o/*.o + endif + + include ./ogr/file.lst +@@ -28,13 +28,8 @@ + $(LD_SHARED) $(GDAL_SLIB_SONAME) $(GDAL_OBJ) $(GDAL_LIBS) $(LDFLAGS) $(LIBS) \ + -o $(GDAL_SLIB) + +-$(GDAL_LIB): $(GDAL_OBJ) GDALmake.opt +- rm -f libgdal.a +- $(AR) r $(GDAL_LIB) $(GDAL_OBJ) +- $(RANLIB) $(GDAL_LIB) +- +-$(GDAL_SLIB): $(GDAL_OBJ) $(GDAL_LIB) +- $(LD_SHARED) $(GDAL_SLIB_SONAME) $(GDAL_OBJ) $(GDAL_LIBS) $(LDFLAGS) $(LIBS) \ ++$(GDAL_SLIB): $(GDAL_OBJ) ++ $(LD_SHARED) $(GDAL_SLIB_SONAME) $(GDAL_OBJ) $(LDFLAGS) $(LIBS) \ + -o $(GDAL_SLIB) + + $(LIBGDAL): $(GDAL_OBJ:.o=.lo) +@@ -47,7 +42,7 @@ + endif + + check-lib: port-target core-target frmts-target ogr-target +- $(MAKE) $(LIBGDAL-yes) ++ $(MAKE) $(GDAL_SLIB) + + port-target: + (cd port; $(MAKE)) diff --git a/make/3rdparty/osgearth/osgearth.mk b/make/3rdparty/osgearth/osgearth.mk new file mode 100644 index 000000000..c1777c15b --- /dev/null +++ b/make/3rdparty/osgearth/osgearth.mk @@ -0,0 +1,326 @@ +################################ +# Targets to build osg and osgearth +# +################################ +# Linux prerequisites +################################ +# +# Install development libraries for: +# - zlib +# - jpeg +# - png +# - tiff +# - curl +# - geos +# - gdal +# +# $ sudo apt-get build-dep openscenegraph +# +# $ sudo apt-get install libtiff5-dev libcurl4-openssl-dev libgeos++-dev libgdal-dev +# libpng-dev lipjpeg-dev +# +# $ 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 +# Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smtp smtps telnet tftp +# Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP +# +# $ gdal-config --version +# 1.10.1 +# +# If using Qt 5.3.1, you'll need to workaround this issue : https://bugreports.qt-project.org/browse/QTBUG-39859 +# by editing the file : ./tool/qt-5.3.1/5.3/gcc/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake +# and commenting out this line : _qt5gui_find_extra_libs(EGL "EGL" "" "/usr/include/libdrm") +# +################################ +# Windows prerequisites +################################ +# +# Windows versions of osg and osgearth require many additional libraries to be build +# See osg_win.sh +# +################################ +# OSX prerequisites +################################ +# +# brew install cmake +# brew install gdal +# +################################ +# Building +################################ +# +# $ make all_osg +# +# This will: +# - clone the git repositories into the ./3rdparty directory +# - build osg in the build directory, building steps are : cmake, make, make install +# - intall osg (in the OP tools directory) +# - create distribution files in the build directory +# - TODO: upload distribution files to the OP wiki download page +# +################################ +# Todo +# - install osgearth in osg (a minor issue in the osgearth cmake file prevents it) +# easy to fix then set INSTALL_TO_OSG_DIR=ON when running cmake on osgearth +# - don't build osg deprecated code (if we don't use it...) +# - add targets to publish distribution files to OP wiki. +# - provide complete list of dependencies for osg and osgearth (current list is most probably incomplete as I already had some stuff installed) +# +################################ + +# TODO should be discovered +QT_VERSION := 5.4.1 + +################################ +# +# common stuff +# +################################ + +OSG_BUILD_CONF := Release + +OSG_NAME_PREFIX := +OSG_NAME_SUFIX := -qt-$(QT_VERSION) + +################################ +# +# osg +# +################################ + +#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_BASE_NAME := osg-$(OSG_VERSION) + +ifeq ($(UNAME), Linux) + ifeq ($(ARCH), x86_64) + OSG_NAME := $(OSG_BASE_NAME)-linux-x64 + else + OSG_NAME := $(OSG_BASE_NAME)-linux-x86 + endif + OSG_CMAKE_GENERATOR := "Unix Makefiles" + 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_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" + # CMake is quite picky about its PATH and will complain if sh.exe is found in it + OSG_BUILD_PATH := "$(TOOLS_DIR)/bin;$(QT_SDK_PREFIX)/bin;$(MINGW_DIR)/bin" +endif + +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/osg-$(OSG_VERSION)_patch.diff + +.PHONY: osg +osg: + @$(ECHO) "Building osg $(call toprel, $(OSG_SRC_DIR)) into $(call toprel, $(OSG_BUILD_DIR))" + $(V1) $(MKDIR) -p $(OSG_BUILD_DIR) + $(V1) ( $(CD) $(OSG_BUILD_DIR) && \ + PATH=$(OSG_BUILD_PATH) && \ + $(CMAKE) -G $(OSG_CMAKE_GENERATOR) -DCMAKE_BUILD_TYPE=$(OSG_BUILD_CONF) \ + -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_PREFIX_PATH=$(BUILD_DIR)/3rdparty/osg_dependencies \ + -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) install ; \ + ) + +.PHONY: package_osg +package_osg: + @$(ECHO) "Packaging $(call toprel, $(OSG_INSTALL_DIR)) into $(notdir $(OSG_INSTALL_DIR)).tar" + #$(V1) $(CP) $(ROOT_DIR)/make/3rdparty/OpenPilotReadme.txt $(OSG_INSTALL_DIR)/ + $(V1) ( \ + $(CD) $(OSG_INSTALL_DIR)/.. && \ + $(TAR) cf $(notdir $(OSG_INSTALL_DIR)).tar $(notdir $(OSG_INSTALL_DIR)) && \ + $(ZIP) -f $(notdir $(OSG_INSTALL_DIR)).tar && \ + $(call MD5_GEN_TEMPLATE,$(notdir $(OSG_INSTALL_DIR)).tar.gz) ; \ + ) + +.PHONY: install_win_osg +install_win_osg: + $(V1) $(CP) $(BUILD_DIR)/3rdparty/osg_dependencies/bin/*.dll $(OSG_INSTALL_DIR)/bin/ + $(V1) $(CP) $(BUILD_DIR)/3rdparty/osg_dependencies/lib/*.dll $(OSG_INSTALL_DIR)/bin/ + +.NOTPARALLEL: +.PHONY: prepare_osg +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) ; \ + 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) ; ) + $(V1) if [ -e $(OSG_PATCH_FILE) ]; then \ + $(ECHO) "Patching osg..." ; \ + ( $(CD) $(OSG_SRC_DIR) && $(GIT) apply $(OSG_PATCH_FILE) ; ) \ + fi + +.PHONY: clean_osg +clean_osg: + @$(ECHO) $(MSG_CLEANING) $(call toprel, $(OSG_BUILD_DIR)) + $(V1) [ ! -d "$(OSG_BUILD_DIR)" ] || $(RM) -r "$(OSG_BUILD_DIR)" + @$(ECHO) $(MSG_CLEANING) $(call toprel, $(OSG_INSTALL_DIR)) + $(V1) [ ! -d "$(OSG_INSTALL_DIR)" ] || $(RM) -r "$(OSG_INSTALL_DIR)" + +.PHONY: clean_all_osg +clean_all_osg: clean_osg + @$(ECHO) $(MSG_CLEANING) $(call toprel, $(OSG_SRC_DIR)) + $(V1) [ ! -d "$(OSG_SRC_DIR)" ] || $(RM) -r "$(OSG_SRC_DIR)" + + +################################ +# +# osgearth +# +################################ +# TODO +# 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_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 +ifeq ($(UNAME), Linux) + ifeq ($(ARCH), x86_64) + OSGEARTH_NAME := $(OSGEARTH_BASE_NAME)-linux-x64 + else + OSGEARTH_NAME := $(OSGEARTH_BASE_NAME)-linux-x86 + endif + OSGEARTH_CMAKE_GENERATOR := "Unix Makefiles" + # 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) +else ifeq ($(UNAME), Darwin) + OSGEARTH_NAME := $(OSGEARTH_BASE_NAME)-clang_64 + OSGEARTH_CMAKE_GENERATOR := "Unix Makefiles" + OSG_WINDOWING_SYSTEM := "Cocoa" + OSGEARTH_BUILD_PATH := $(QT_SDK_PREFIX)/bin:$(OSG_INSTALL_DIR)/bin:$(PATH) +else ifeq ($(UNAME), Windows) + OSGEARTH_NAME := $(OSGEARTH_BASE_NAME)-$(QT_SDK_ARCH) + OSGEARTH_CMAKE_GENERATOR := "MinGW Makefiles" + # CMake is quite picky about its PATH and will complain if sh.exe is found in it + OSGEARTH_BUILD_PATH := "$(TOOLS_DIR)/bin;$(QT_SDK_PREFIX)/bin;$(MINGW_DIR)/bin;$(OSG_INSTALL_DIR)/bin" +endif + +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 will be installed into osg (there is an offical option to do that but it seems broken on mingw) +#OSGEARTH_INSTALL_DIR := $(BUILD_DIR)/3rdparty/install/$(OSGEARTH_NAME) +OSGEARTH_INSTALL_DIR := $(OSG_INSTALL_DIR) +OSGEARTH_PATCH_FILE := $(ROOT_DIR)/make/3rdparty/osgearth-$(OSGEARTH_VERSION)_patch.diff + +.PHONY: osgearth +osgearth: + @$(ECHO) "Building osgEarth $(call toprel, $(OSGEARTH_SRC_DIR)) into $(call toprel, $(OSGEARTH_BUILD_DIR))" + $(V1) $(MKDIR) -p $(OSGEARTH_BUILD_DIR) + $(V1) ( $(CD) $(OSGEARTH_BUILD_DIR) && \ + PATH=$(OSGEARTH_BUILD_PATH) && \ + LD_LIBRARY_PATH=$(OSG_INSTALL_DIR)/lib && \ + export DYLD_LIBRARY_PATH=$(OSG_INSTALL_DIR)/lib && \ + $(CMAKE) -G $(OSGEARTH_CMAKE_GENERATOR) -DCMAKE_BUILD_TYPE=$(OSGEARTH_BUILD_CONF) \ + -DOSGEARTH_USE_QT=ON \ + -DINSTALL_TO_OSG_DIR=OFF \ + -DOSG_DIR=$(OSG_INSTALL_DIR) \ + -DCMAKE_INCLUDE_PATH=$(OSG_INSTALL_DIR)/include \ + -DCMAKE_LIBRARY_PATH=$(OSG_INSTALL_DIR)/lib \ + -DCMAKE_PREFIX_PATH=$(BUILD_DIR)/3rdparty/osg_dependencies \ + -DCMAKE_OSX_ARCHITECTURES="x86_64" \ + -DOSG_WINDOWING_SYSTEM=$(OSG_WINDOWING_SYSTEM) \ + -DCMAKE_INSTALL_NAME_DIR=@executable_path/../Plugins \ + -DCMAKE_INSTALL_PREFIX=$(OSGEARTH_INSTALL_DIR) $(OSGEARTH_SRC_DIR) && \ + $(MAKE) && \ + $(MAKE) install ; \ + ) + +.PHONY: package_osgearth +package_osgearth: + @$(ECHO) "Packaging $(call toprel, $(OSGEARTH_INSTALL_DIR)) into $(notdir $(OSGEARTH_INSTALL_DIR)).tar" + $(V1) ( \ + $(CD) $(OSGEARTH_INSTALL_DIR)/.. && \ + $(TAR) cf $(notdir $(OSGEARTH_INSTALL_DIR)).tar $(notdir $(OSGEARTH_INSTALL_DIR)) && \ + $(ZIP) -f $(notdir $(OSGEARTH_INSTALL_DIR)).tar && \ + $(call MD5_GEN_TEMPLATE,$(notdir $(OSGEARTH_INSTALL_DIR)).tar.gz) ; \ + ) + +.NOTPARALLEL: +.PHONY: prepare_osgearth +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) ; \ + 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) "Patching osgearth..." ; \ + ( $(CD) $(OSGEARTH_SRC_DIR) && $(GIT) apply $(OSGEARTH_PATCH_FILE) ; ) \ + fi + +.PHONY: clean_osgearth +clean_osgearth: + @$(ECHO) $(MSG_CLEANING) $(call toprel, $(OSGEARTH_BUILD_DIR)) + $(V1) [ ! -d "$(OSGEARTH_BUILD_DIR)" ] || $(RM) -r "$(OSGEARTH_BUILD_DIR)" + @$(ECHO) $(MSG_CLEANING) $(call toprel, $(OSGEARTH_INSTALL_DIR)) + $(V1) [ ! -d "$(OSGEARTH_INSTALL_DIR)" ] || $(RM) -r "$(OSGEARTH_INSTALL_DIR)" + +.PHONY: clean_all_osgearth +clean_all_osgearth: clean_osgearth + @$(ECHO) $(MSG_CLEANING) $(call toprel, $(OSGEARTH_SRC_DIR)) + $(V1) [ ! -d "$(OSGEARTH_SRC_DIR)" ] || $(RM) -r "$(OSGEARTH_SRC_DIR)" + +################################ +# +# all +# +################################ + +.NOTPARALLEL: +.PHONY: all_osg + +ifeq ($(UNAME), Windows) +all_osg: prepare_osg prepare_osgearth osg osgearth install_win_osg package_osg +else +all_osg: prepare_osg prepare_osgearth osg osgearth package_osg +endif diff --git a/make/3rdparty/osgearth/osgearth_dependencies_win.sh b/make/3rdparty/osgearth/osgearth_dependencies_win.sh new file mode 100644 index 000000000..49a4f07bf --- /dev/null +++ b/make/3rdparty/osgearth/osgearth_dependencies_win.sh @@ -0,0 +1,348 @@ +################################################################################ +#!/bin/bash +################################################################################ +# +# This script compiles GDAL and other dependencies needed by OSG and OSGEarth +# +# A good source for building with mingw : +# http://www.gaia-gis.it/gaia-sins/mingw_how_to.html +# +################################################################################ + +################################################################################ +# Environment +################################################################################ + +WORKING_DIR=$PWD + +ROOT_DIR=/d/Projects/OpenPilot + +DOWNLOAD_DIR=$ROOT_DIR/downloads/osgearth +SOURCE_DIR=$ROOT_DIR/3rdparty/osgearth_dependencies +BUILD_DIR=$ROOT_DIR/build/3rdparty/osgearth_dependencies + +HOST=mingw32 + +# list of libraries to build +# other candidates include bzip2, libxml2, gif, geotiff, ssl, gl... +BUILD_PKGCONFIG=1 +BUILD_ZLIB=1 +BUILD_LIBJPEG=1 +BUILD_LIBPNG=1 +BUILD_LIBTIFF=1 +BUILD_FREETYPE=1 +BUILD_OPENSSL=2 +BUILD_CURL=1 +BUILD_PROJ4=1 +BUILD_GEOS=1 +BUILD_GDAL=1 + +# TODO +# libcurl needs to be built with zlib and ssl support +# gdal does not seem to link with shared proj4 +# document libraries (required by, requires) + +mkdir -p $SOURCE_DIR/ +mkdir -p $BUILD_DIR/bin/ +mkdir -p $BUILD_DIR/include/ +mkdir -p $BUILD_DIR/lib/ + +# make sure all libraries see each others +export PATH=$BUILD_DIR/bin:$PATH +export CPATH=$BUILD_DIR/include +export LIBRARY_PATH=$BUILD_DIR/lib +export PKG_CONFIG_PATH=$BUILD_DIR/lib/pkgconfig + +# reduce binary sizes by removing the -g option (not picked up by all libraries) +export CFLAGS=-O2 +export CXXFLAGS=-O2 + +################################################################################ +# pkg-config +# required by libcurl, gdal, osg, osgearth +################################################################################ + +if [ "$BUILD_PKGCONFIG" -eq 1 ]; then + +echo "****************************************" +echo "Building pkg-config..." +echo "****************************************" + +cd $SOURCE_DIR +tar xzf $DOWNLOAD_DIR/pkg-config-0.28.tar.gz -C . +cd pkg-config-0.28 + +./configure --prefix=$BUILD_DIR --build=$HOST \ + --with-internal-glib +make +make install + +fi + +################################################################################ +# ZLIB +# required by libcurl, gdal, osg, osgearth +################################################################################ + +if [ "$BUILD_ZLIB" -eq 1 ]; then + +echo "****************************************" +echo "Building zlib..." +echo "****************************************" + +cd $SOURCE_DIR +tar xzf $DOWNLOAD_DIR/zlib-1.2.8.tar.gz -C . +cd zlib-1.2.8 + +make -f win32/Makefile.gcc clean +make -f win32/Makefile.gcc + +cp -f zlib1.dll $BUILD_DIR/bin/ +cp -f zconf.h $BUILD_DIR/include/ +cp -f zlib.h $BUILD_DIR/include/ +cp -f libz.a $BUILD_DIR/lib/ +cp -f libz.dll.a $BUILD_DIR/lib/ + +fi + +################################################################################ +# LIBJPEG +# required by gdal, osg, osgearth +################################################################################ + +if [ "$BUILD_LIBJPEG" -eq 1 ]; then + +echo "****************************************" +echo "Building libjpeg..." +echo "****************************************" + +cd $SOURCE_DIR +tar xzf $DOWNLOAD_DIR/jpegsrc.v9a.tar.gz -C . +cd jpeg-9a + +./configure --prefix=$BUILD_DIR --build=$HOST +make +make install-strip + +fi + +################################################################################ +# LIBPNG +# required by gdal, osg, osgearth +################################################################################ + +if [ "$BUILD_LIBPNG" -eq 1 ]; then + +echo "****************************************" +echo "Building libpng..." +echo "****************************************" + +cd $SOURCE_DIR +tar xzf $DOWNLOAD_DIR/libpng-1.6.14.tar.gz -C . +cd libpng-1.6.14 + +./configure --prefix=$BUILD_DIR --build=$HOST +make +make install-strip + +fi + +################################################################################ +# LIBTIFF +# reqires zlib +# required by gdal, osg, osgearth +################################################################################ + +if [ "$BUILD_LIBTIFF" -eq 1 ]; then + +echo "****************************************" +echo "Building libtiff..." +echo "****************************************" + +cd $SOURCE_DIR +tar xzf $DOWNLOAD_DIR/tiff-4.0.3.tar.gz -C . +cd tiff-4.0.3 + +./configure --prefix=$BUILD_DIR --build=$HOST +make +make install-strip + +fi + +################################################################################ +# FreeType +################################################################################ + +if [ "$BUILD_FREETYPE" -eq 1 ]; then + +echo "****************************************" +echo "Building FreeType..." +echo "****************************************" + +cd $SOURCE_DIR +tar xzf $DOWNLOAD_DIR/freetype-2.5.3.tar.gz -C . +cd freetype-2.5.3 + +#unzip -q $DOWNLOAD_DIR/freetype-2.3.5-1-src.zip src/freetype/2.3.5/freetype-2.3.5/* -d $TEMP/freetype-2.3.5 +#cp -r $TEMP/freetype-2.3.5/src/freetype/2.3.5/freetype-2.3.5 ./ +#rm -rf $TEMP/freetype-2.3.5 +#cd freetype-2.3.5 + +./configure --prefix=$BUILD_DIR +make +make install + +# hack for osg +#mv $BUILD_DIR/include/freetype2 $BUILD_DIR/include/freetype + +fi + +################################################################################ +# OpenSSL +################################################################################ + +if [ "$BUILD_OPENSSL" -eq 1 ]; then + +echo "****************************************" +echo "Building OpenSSL..." +echo "****************************************" + +cd $SOURCE_DIR +tar xzf $DOWNLOAD_DIR/curl-7.38.0.tar.gz -C . +cd curl-7.38.0 + +./configure --prefix=$BUILD_DIR --build=$HOST +make +make install + +fi + +################################################################################ +# cURL +# required by gdal, osgearth +################################################################################ + +if [ "$BUILD_CURL" -eq 1 ]; then + +echo "****************************************" +echo "Building cURL..." +echo "****************************************" + +cd $SOURCE_DIR +tar xzf $DOWNLOAD_DIR/curl-7.38.0.tar.gz -C . +cd curl-7.38.0 + +# see http://curl.haxx.se/docs/install.html +#set ZLIB_PATH=c:\zlib-1.2.8 +#set OPENSSL_PATH=c:\openssl-0.9.8y +#set LIBSSH2_PATH=c:\libssh2-1.4.3 +#mingw32-make mingw32-zlib' to build with Zlib support; +#mingw32-make mingw32-ssl-zlib' to build with SSL and Zlib enabled; +#mingw32-make mingw32-ssh2-ssl-zlib' to build with SSH2, SSL, Zlib; +#mingw32-make mingw32-ssh2-ssl-sspi-zlib' to build with SSH2, SSL, Zlib + +#mingw32-make mingw32 + +#cp -f src/curl.exe $BUILD_DIR/bin/ +#cp -rf include/curl $BUILD_DIR/include/ +#cp -f lib/libcurl.dll $BUILD_DIR/bin/ +#cp -f lib/libcurldll.a $BUILD_DIR/lib/ +#cp -f lib/libcurl.a $BUILD_DIR/lib/ + +./configure --prefix=$BUILD_DIR --build=$HOST \ + --enable-shared=yes --with-zlib=$BUILD_DIR +make +make install-strip + +fi + +################################################################################ +# PROJ.4 +# required by osgearth +################################################################################ + +if [ "$BUILD_PROJ4" -eq 1 ]; then + +echo "****************************************" +echo "Building PROJ.4..." +echo "****************************************" + +cd $SOURCE_DIR +tar -xzf $DOWNLOAD_DIR/proj-4.8.0.tar.gz -C . +tar -xzf $DOWNLOAD_DIR/proj-datumgrid-1.5.tar.gz -C proj-4.8.0/nad/ +cd proj-4.8.0 + +./configure --prefix=$BUILD_DIR --build=$HOST \ + --enable-static=no --enable-shared=yes +make +make install + +fi + +################################################################################ +# GEOS +# required by gdal +################################################################################ + +if [ "$BUILD_GEOS" -eq 1 ]; then + +echo "****************************************" +echo "Building GEOS..." +echo "****************************************" + +cd $SOURCE_DIR +tar xjf $DOWNLOAD_DIR/geos-3.3.8.tar.bz2 -C . +cd geos-3.3.8 + +# TODO why --disable-inline? +./configure --prefix=$BUILD_DIR --build=$HOST \ + --enable-static=no --enable-shared=yes --disable-inline +make +make install + +fi + +################################################################################ +# GDAL +# requires zlib, libcurl, libpng, libjpeg, libtiff, geos +# required by osgearth +################################################################################ + +if [ "$BUILD_GDAL" -eq 1 ]; then + +echo "****************************************" +echo "Building GDAL..." +echo "****************************************" + +cd $SOURCE_DIR +tar xzf $DOWNLOAD_DIR/gdal-1.10.1.tar.gz -C . +cd gdal-1.10.1 + +# fix GNUmakefile as described here http://trac.osgeo.org/gdal/wiki/BuildingWithMinGW +patch < $WORKING_DIR/gdal_GNUmakefile_fix.diff + +./configure --prefix=$BUILD_DIR --build=$HOST \ + --without-python --without-libtool \ + --with-xerces=no \ + --with-libz=$BUILD_DIR --with-curl=$BUILD_DIR \ + --with-png=$BUILD_DIR --with-jpeg=$BUILD_DIR --with-libtiff=$BUILD_DIR \ + --with-geos=$BUILD_DIR/bin/geos-config +make +make install + +# --with-xerces=no --with-libz=$BUILD_DIR \ +# --with-png=$BUILD_DIR --with-jpeg=$BUILD_DIR --with-curl=$BUILD_DIR +# --with-libtiff=$BUILD_DIR --with-geos=$BUILD_DIR/bin/geos-config + +# $(CONFIGURE) --prefix=$BUILD_DIR --build=$(HOST) --enable-static=no --enable-shared=yes --without-python --without-libtool --with-libz=$(DEP_INSTALL_DIR) --with-libtiff=$(DEP_INSTALL_DIR) --with-png=$(DEP_INSTALL_DIR) --with-jpeg=$(DEP_INSTALL_DIR) && \ + + +# --enable-static=no --enable-shared=yes + + +#./configure --prefix=$WORKSPACE/dist --enable-shared=yes --enable-static=yes --with-python=no --with-xerces=no --with-expat=$WORKSPACE/dist --with-expat-lib=-L$WORKSPACE/dist/lib --with-curl=no --with-sqlite3=$WORKSPACE/dist --with-odbc=no --with-mysql=no --with-oci=no --with-pg=$WORKSPACE/dist/bin/pg_config --with-geos=no --with-libz=internal --with-png=internal --with-libtiff=internal --with-geotiff=internal --with-jpeg=internal --with-gif=internal --with-jasper=no --with-mrsid=no --with-mrsid_lidar=no --with-ecw=no --with-pcraster=internal --with-xml2=no --with-threads=yes --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --without-libtool --enable-fast-install +#./configure --prefix=$WORKSPACE/dist --enable-shared=yes --enable-static=no --with-python=no --with-xerces=no --with-expat=$WORKSPACE/dist --with-curl=no --with-sqlite3=$WORKSPACE/dist --with-odbc=no --with-mysql=no --with-oci=no --with-pg=$WORKSPACE/dist/bin/pg_config --with-geos=yes --with-libz=internal --with-png=internal --with-libtiff=internal --with-geotiff=internal --with-jpeg=internal --with-gif=internal --with-jasper=no --with-mrsid=no --with-mrsid_lidar=no --with-ecw=no --with-pcraster=internal --with-threads=yes --host=$HOST --build=$HOST --without-libtool --enable-fast-install --with-expat-lib=-L$WORKSPACE/dist/lib + +fi + +################################################################################ From 9658ba3500db413a7215ebfabd880d71c69f7cfa Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sun, 6 Sep 2015 16:50:45 +0200 Subject: [PATCH 02/21] LP-30 removed old commented out scruff from osg win script --- .../osgearth/osgearth_dependencies_win.sh | 38 +------------------ 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/make/3rdparty/osgearth/osgearth_dependencies_win.sh b/make/3rdparty/osgearth/osgearth_dependencies_win.sh index 49a4f07bf..b20b01515 100644 --- a/make/3rdparty/osgearth/osgearth_dependencies_win.sh +++ b/make/3rdparty/osgearth/osgearth_dependencies_win.sh @@ -38,9 +38,8 @@ BUILD_GEOS=1 BUILD_GDAL=1 # TODO -# libcurl needs to be built with zlib and ssl support +# libcurl needs to be built with ssl support # gdal does not seem to link with shared proj4 -# document libraries (required by, requires) mkdir -p $SOURCE_DIR/ mkdir -p $BUILD_DIR/bin/ @@ -183,11 +182,6 @@ cd $SOURCE_DIR tar xzf $DOWNLOAD_DIR/freetype-2.5.3.tar.gz -C . cd freetype-2.5.3 -#unzip -q $DOWNLOAD_DIR/freetype-2.3.5-1-src.zip src/freetype/2.3.5/freetype-2.3.5/* -d $TEMP/freetype-2.3.5 -#cp -r $TEMP/freetype-2.3.5/src/freetype/2.3.5/freetype-2.3.5 ./ -#rm -rf $TEMP/freetype-2.3.5 -#cd freetype-2.3.5 - ./configure --prefix=$BUILD_DIR make make install @@ -232,23 +226,6 @@ cd $SOURCE_DIR tar xzf $DOWNLOAD_DIR/curl-7.38.0.tar.gz -C . cd curl-7.38.0 -# see http://curl.haxx.se/docs/install.html -#set ZLIB_PATH=c:\zlib-1.2.8 -#set OPENSSL_PATH=c:\openssl-0.9.8y -#set LIBSSH2_PATH=c:\libssh2-1.4.3 -#mingw32-make mingw32-zlib' to build with Zlib support; -#mingw32-make mingw32-ssl-zlib' to build with SSL and Zlib enabled; -#mingw32-make mingw32-ssh2-ssl-zlib' to build with SSH2, SSL, Zlib; -#mingw32-make mingw32-ssh2-ssl-sspi-zlib' to build with SSH2, SSL, Zlib - -#mingw32-make mingw32 - -#cp -f src/curl.exe $BUILD_DIR/bin/ -#cp -rf include/curl $BUILD_DIR/include/ -#cp -f lib/libcurl.dll $BUILD_DIR/bin/ -#cp -f lib/libcurldll.a $BUILD_DIR/lib/ -#cp -f lib/libcurl.a $BUILD_DIR/lib/ - ./configure --prefix=$BUILD_DIR --build=$HOST \ --enable-shared=yes --with-zlib=$BUILD_DIR make @@ -330,19 +307,6 @@ patch < $WORKING_DIR/gdal_GNUmakefile_fix.diff make make install -# --with-xerces=no --with-libz=$BUILD_DIR \ -# --with-png=$BUILD_DIR --with-jpeg=$BUILD_DIR --with-curl=$BUILD_DIR -# --with-libtiff=$BUILD_DIR --with-geos=$BUILD_DIR/bin/geos-config - -# $(CONFIGURE) --prefix=$BUILD_DIR --build=$(HOST) --enable-static=no --enable-shared=yes --without-python --without-libtool --with-libz=$(DEP_INSTALL_DIR) --with-libtiff=$(DEP_INSTALL_DIR) --with-png=$(DEP_INSTALL_DIR) --with-jpeg=$(DEP_INSTALL_DIR) && \ - - -# --enable-static=no --enable-shared=yes - - -#./configure --prefix=$WORKSPACE/dist --enable-shared=yes --enable-static=yes --with-python=no --with-xerces=no --with-expat=$WORKSPACE/dist --with-expat-lib=-L$WORKSPACE/dist/lib --with-curl=no --with-sqlite3=$WORKSPACE/dist --with-odbc=no --with-mysql=no --with-oci=no --with-pg=$WORKSPACE/dist/bin/pg_config --with-geos=no --with-libz=internal --with-png=internal --with-libtiff=internal --with-geotiff=internal --with-jpeg=internal --with-gif=internal --with-jasper=no --with-mrsid=no --with-mrsid_lidar=no --with-ecw=no --with-pcraster=internal --with-xml2=no --with-threads=yes --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --without-libtool --enable-fast-install -#./configure --prefix=$WORKSPACE/dist --enable-shared=yes --enable-static=no --with-python=no --with-xerces=no --with-expat=$WORKSPACE/dist --with-curl=no --with-sqlite3=$WORKSPACE/dist --with-odbc=no --with-mysql=no --with-oci=no --with-pg=$WORKSPACE/dist/bin/pg_config --with-geos=yes --with-libz=internal --with-png=internal --with-libtiff=internal --with-geotiff=internal --with-jpeg=internal --with-gif=internal --with-jasper=no --with-mrsid=no --with-mrsid_lidar=no --with-ecw=no --with-pcraster=internal --with-threads=yes --host=$HOST --build=$HOST --without-libtool --enable-fast-install --with-expat-lib=-L$WORKSPACE/dist/lib - fi ################################################################################ From ca1fa5fe3e2679832e5cd325f2b2866c6505bd93 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sun, 6 Sep 2015 17:05:29 +0200 Subject: [PATCH 03/21] LP-30 removed references to OP and other minor cleanups --- make/3rdparty/osgearth/osgearth.mk | 8 ++++---- make/3rdparty/osgearth/osgearth_dependencies_win.sh | 6 ++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/make/3rdparty/osgearth/osgearth.mk b/make/3rdparty/osgearth/osgearth.mk index c1777c15b..13cef7a5c 100644 --- a/make/3rdparty/osgearth/osgearth.mk +++ b/make/3rdparty/osgearth/osgearth.mk @@ -54,16 +54,16 @@ # This will: # - clone the git repositories into the ./3rdparty directory # - build osg in the build directory, building steps are : cmake, make, make install -# - intall osg (in the OP tools directory) +# - intall osg in the build directory # - create distribution files in the build directory -# - TODO: upload distribution files to the OP wiki download page +# - TODO: upload distribution files to the wiki download page # ################################ # Todo # - install osgearth in osg (a minor issue in the osgearth cmake file prevents it) # easy to fix then set INSTALL_TO_OSG_DIR=ON when running cmake on osgearth # - don't build osg deprecated code (if we don't use it...) -# - add targets to publish distribution files to OP wiki. +# - add targets to upload distribution files to wiki. # - provide complete list of dependencies for osg and osgearth (current list is most probably incomplete as I already had some stuff installed) # ################################ @@ -150,7 +150,7 @@ osg: .PHONY: package_osg package_osg: @$(ECHO) "Packaging $(call toprel, $(OSG_INSTALL_DIR)) into $(notdir $(OSG_INSTALL_DIR)).tar" - #$(V1) $(CP) $(ROOT_DIR)/make/3rdparty/OpenPilotReadme.txt $(OSG_INSTALL_DIR)/ + #$(V1) $(CP) $(ROOT_DIR)/make/3rdparty/LibrePilotReadme.txt $(OSG_INSTALL_DIR)/ $(V1) ( \ $(CD) $(OSG_INSTALL_DIR)/.. && \ $(TAR) cf $(notdir $(OSG_INSTALL_DIR)).tar $(notdir $(OSG_INSTALL_DIR)) && \ diff --git a/make/3rdparty/osgearth/osgearth_dependencies_win.sh b/make/3rdparty/osgearth/osgearth_dependencies_win.sh index b20b01515..67b86d6a6 100644 --- a/make/3rdparty/osgearth/osgearth_dependencies_win.sh +++ b/make/3rdparty/osgearth/osgearth_dependencies_win.sh @@ -15,7 +15,8 @@ WORKING_DIR=$PWD -ROOT_DIR=/d/Projects/OpenPilot +# TODO this should not be hardwired +ROOT_DIR=/d/Projects/LibrePilot DOWNLOAD_DIR=$ROOT_DIR/downloads/osgearth SOURCE_DIR=$ROOT_DIR/3rdparty/osgearth_dependencies @@ -186,9 +187,6 @@ cd freetype-2.5.3 make make install -# hack for osg -#mv $BUILD_DIR/include/freetype2 $BUILD_DIR/include/freetype - fi ################################################################################ From 9436bae7c898338a75b1ab8cc24388086e4211b2 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Tue, 8 Sep 2015 09:12:30 +0200 Subject: [PATCH 04/21] LP-30 fixed linux 64 packaging issue --- make/3rdparty/osgearth/osgearth.mk | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/make/3rdparty/osgearth/osgearth.mk b/make/3rdparty/osgearth/osgearth.mk index 13cef7a5c..4fb0dff06 100644 --- a/make/3rdparty/osgearth/osgearth.mk +++ b/make/3rdparty/osgearth/osgearth.mk @@ -225,6 +225,11 @@ ifeq ($(UNAME), Linux) OSGEARTH_CMAKE_GENERATOR := "Unix Makefiles" # 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) + ifeq ($(ARCH), x86_64) + OSGEARTH_LIB_PATH := $(OSG_INSTALL_DIR)/lib64 + else + OSGEARTH_LIB_PATH := $(OSG_INSTALL_DIR)/lib + endif else ifeq ($(UNAME), Darwin) OSGEARTH_NAME := $(OSGEARTH_BASE_NAME)-clang_64 OSGEARTH_CMAKE_GENERATOR := "Unix Makefiles" @@ -235,6 +240,7 @@ else ifeq ($(UNAME), Windows) OSGEARTH_CMAKE_GENERATOR := "MinGW Makefiles" # CMake is quite picky about its PATH and will complain if sh.exe is found in it OSGEARTH_BUILD_PATH := "$(TOOLS_DIR)/bin;$(QT_SDK_PREFIX)/bin;$(MINGW_DIR)/bin;$(OSG_INSTALL_DIR)/bin" + OSGEARTH_LIB_PATH := $(OSG_INSTALL_DIR)/lib endif OSGEARTH_NAME := $(OSG_NAME_PREFIX)$(OSGEARTH_NAME)$(OSG_NAME_SUFIX) @@ -251,8 +257,8 @@ osgearth: $(V1) $(MKDIR) -p $(OSGEARTH_BUILD_DIR) $(V1) ( $(CD) $(OSGEARTH_BUILD_DIR) && \ PATH=$(OSGEARTH_BUILD_PATH) && \ - LD_LIBRARY_PATH=$(OSG_INSTALL_DIR)/lib && \ - export DYLD_LIBRARY_PATH=$(OSG_INSTALL_DIR)/lib && \ + LD_LIBRARY_PATH=$(OSGEARTH_LIB_PATH) && \ + export DYLD_LIBRARY_PATH=$(OSG_LIB_PATH)/lib && \ $(CMAKE) -G $(OSGEARTH_CMAKE_GENERATOR) -DCMAKE_BUILD_TYPE=$(OSGEARTH_BUILD_CONF) \ -DOSGEARTH_USE_QT=ON \ -DINSTALL_TO_OSG_DIR=OFF \ From 59636cb2eca8d18e3d373063eb61398abe871155 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Tue, 8 Sep 2015 22:45:07 +0200 Subject: [PATCH 05/21] LP-30 get marble maps from gitlab --- make/3rdparty/marble/marble.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/make/3rdparty/marble/marble.mk b/make/3rdparty/marble/marble.mk index 2f3d29c09..4fbac0737 100644 --- a/make/3rdparty/marble/marble.mk +++ b/make/3rdparty/marble/marble.mk @@ -126,7 +126,7 @@ clone_marble: $(V1) if [ ! -d "$(MARBLE_SRC_DIR)/googlemaps" ]; then \ $(ECHO) "Cloning googlemaps to $(call toprel, $(MARBLE_SRC_DIR)/googlemaps)" ; \ - $(GIT) clone https://gitorious.org/marble-restricted-maps/googlemaps.git $(MARBLE_SRC_DIR)/googlemaps ; \ + $(GIT) clone https://gitlab.com/marble-restricted-maps/googlemaps.git $(MARBLE_SRC_DIR)/googlemaps ; \ fi @$(ECHO) "Fetching googlemaps..." $(V1) ( $(CD) $(MARBLE_SRC_DIR)/googlemaps && $(GIT) fetch ; ) @@ -135,7 +135,7 @@ clone_marble: $(V1) if [ ! -d "$(MARBLE_SRC_DIR)/googlesat" ]; then \ $(ECHO) "Cloning googlesat to $(call toprel, $(MARBLE_SRC_DIR)/googlesat)" ; \ - $(GIT) clone https://gitorious.org/marble-restricted-maps/googlesat.git $(MARBLE_SRC_DIR)/googlesat ; \ + $(GIT) clone https://gitlab.com/marble-restricted-maps/googlesat.git $(MARBLE_SRC_DIR)/googlesat ; \ fi @$(ECHO) "Fetching googlesat..." $(V1) ( $(CD) $(MARBLE_SRC_DIR)/googlesat && $(GIT) fetch ; ) From 7b443715ae13d2496cb9c21c9400d0211f4be2ff Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Tue, 8 Sep 2015 22:52:52 +0200 Subject: [PATCH 06/21] LP-30 don't package non existant LibrePilotReadme.txt with marble --- make/3rdparty/marble/marble.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make/3rdparty/marble/marble.mk b/make/3rdparty/marble/marble.mk index 4fbac0737..3692c91a6 100644 --- a/make/3rdparty/marble/marble.mk +++ b/make/3rdparty/marble/marble.mk @@ -97,7 +97,7 @@ marble: .PHONY: package_marble package_marble: @$(ECHO) "Packaging $(call toprel, $(MARBLE_INSTALL_DIR)) into $(notdir $(MARBLE_INSTALL_DIR)).tar" - $(V1) $(CP) $(ROOT_DIR)/make/3rdparty/OpenPilotReadme.txt $(MARBLE_INSTALL_DIR)/ + #$(V1) $(CP) $(ROOT_DIR)/make/3rdparty/LibrePilotReadme.txt $(MARBLE_INSTALL_DIR)/ $(V1) ( \ $(CD) $(MARBLE_INSTALL_DIR)/.. && \ $(TAR) cf $(notdir $(MARBLE_INSTALL_DIR)).tar $(notdir $(MARBLE_INSTALL_DIR)) && \ From 225097fbcbe94ad4ef8c8be3aa934f19d735f29c Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Tue, 8 Sep 2015 22:53:47 +0200 Subject: [PATCH 07/21] LP-30 use .patch extension instead of .diff for patch files --- make/3rdparty/marble/marble.mk | 2 +- .../{gdal_GNUmakefile_fix.diff => gdal_GNUmakefile_fix.patch} | 0 make/3rdparty/osgearth/osgearth.mk | 4 ++-- make/3rdparty/osgearth/osgearth_dependencies_win.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename make/3rdparty/osgearth/{gdal_GNUmakefile_fix.diff => gdal_GNUmakefile_fix.patch} (100%) diff --git a/make/3rdparty/marble/marble.mk b/make/3rdparty/marble/marble.mk index 3692c91a6..e060556d8 100644 --- a/make/3rdparty/marble/marble.mk +++ b/make/3rdparty/marble/marble.mk @@ -66,7 +66,7 @@ MARBLE_SRC_DIR := $(ROOT_DIR)/3rdparty/marble MARBLE_BUILD_DIR := $(BUILD_DIR)/3rdparty/$(MARBLE_NAME) MARBLE_INSTALL_DIR := $(BUILD_DIR)/3rdparty/install/$(MARBLE_NAME) MARBLE_DATA_DIR := $(MARBLE_INSTALL_DIR)/$(MARBLE_DATA_BASE_DIR) -MARBLE_PATCH_FILE := $(ROOT_DIR)/make/3rdparty/marble-$(MARBLE_VERSION)_patch.diff +MARBLE_PATCH_FILE := $(ROOT_DIR)/make/3rdparty/marble-$(MARBLE_VERSION).patch .PHONY: marble marble: diff --git a/make/3rdparty/osgearth/gdal_GNUmakefile_fix.diff b/make/3rdparty/osgearth/gdal_GNUmakefile_fix.patch similarity index 100% rename from make/3rdparty/osgearth/gdal_GNUmakefile_fix.diff rename to make/3rdparty/osgearth/gdal_GNUmakefile_fix.patch diff --git a/make/3rdparty/osgearth/osgearth.mk b/make/3rdparty/osgearth/osgearth.mk index 4fb0dff06..360457bf5 100644 --- a/make/3rdparty/osgearth/osgearth.mk +++ b/make/3rdparty/osgearth/osgearth.mk @@ -123,7 +123,7 @@ 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/osg-$(OSG_VERSION)_patch.diff +OSG_PATCH_FILE := $(ROOT_DIR)/make/3rdparty/osg-$(OSG_VERSION).patch .PHONY: osg osg: @@ -249,7 +249,7 @@ OSGEARTH_BUILD_DIR := $(BUILD_DIR)/3rdparty/$(OSGEARTH_NAME) # osgearth will be installed into osg (there is an offical option to do that but it seems broken on mingw) #OSGEARTH_INSTALL_DIR := $(BUILD_DIR)/3rdparty/install/$(OSGEARTH_NAME) OSGEARTH_INSTALL_DIR := $(OSG_INSTALL_DIR) -OSGEARTH_PATCH_FILE := $(ROOT_DIR)/make/3rdparty/osgearth-$(OSGEARTH_VERSION)_patch.diff +OSGEARTH_PATCH_FILE := $(ROOT_DIR)/make/3rdparty/osgearth-$(OSGEARTH_VERSION).patch .PHONY: osgearth osgearth: diff --git a/make/3rdparty/osgearth/osgearth_dependencies_win.sh b/make/3rdparty/osgearth/osgearth_dependencies_win.sh index 67b86d6a6..b5f76643a 100644 --- a/make/3rdparty/osgearth/osgearth_dependencies_win.sh +++ b/make/3rdparty/osgearth/osgearth_dependencies_win.sh @@ -294,7 +294,7 @@ tar xzf $DOWNLOAD_DIR/gdal-1.10.1.tar.gz -C . cd gdal-1.10.1 # fix GNUmakefile as described here http://trac.osgeo.org/gdal/wiki/BuildingWithMinGW -patch < $WORKING_DIR/gdal_GNUmakefile_fix.diff +patch < $WORKING_DIR/gdal_GNUmakefile_fix.patch ./configure --prefix=$BUILD_DIR --build=$HOST \ --without-python --without-libtool \ From 6af2d6920d5062e6a46ff64c3d2624ac0612eed6 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Tue, 8 Sep 2015 23:06:42 +0200 Subject: [PATCH 08/21] LP-30 fixed lib path when building osgearth on osx --- make/3rdparty/osgearth/osgearth.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/make/3rdparty/osgearth/osgearth.mk b/make/3rdparty/osgearth/osgearth.mk index 360457bf5..837cb5d12 100644 --- a/make/3rdparty/osgearth/osgearth.mk +++ b/make/3rdparty/osgearth/osgearth.mk @@ -235,6 +235,7 @@ else ifeq ($(UNAME), Darwin) OSGEARTH_CMAKE_GENERATOR := "Unix Makefiles" OSG_WINDOWING_SYSTEM := "Cocoa" OSGEARTH_BUILD_PATH := $(QT_SDK_PREFIX)/bin:$(OSG_INSTALL_DIR)/bin:$(PATH) + OSGEARTH_LIB_PATH := $(OSG_INSTALL_DIR)/lib else ifeq ($(UNAME), Windows) OSGEARTH_NAME := $(OSGEARTH_BASE_NAME)-$(QT_SDK_ARCH) OSGEARTH_CMAKE_GENERATOR := "MinGW Makefiles" @@ -246,7 +247,7 @@ endif 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 will be installed into osg (there is an offical option to do that but it seems broken on mingw) +# osgearth will be installed into osg (there is an official option to do that but it seems broken on mingw) #OSGEARTH_INSTALL_DIR := $(BUILD_DIR)/3rdparty/install/$(OSGEARTH_NAME) OSGEARTH_INSTALL_DIR := $(OSG_INSTALL_DIR) OSGEARTH_PATCH_FILE := $(ROOT_DIR)/make/3rdparty/osgearth-$(OSGEARTH_VERSION).patch @@ -258,7 +259,7 @@ osgearth: $(V1) ( $(CD) $(OSGEARTH_BUILD_DIR) && \ PATH=$(OSGEARTH_BUILD_PATH) && \ LD_LIBRARY_PATH=$(OSGEARTH_LIB_PATH) && \ - export DYLD_LIBRARY_PATH=$(OSG_LIB_PATH)/lib && \ + export DYLD_LIBRARY_PATH=$(OSG_LIB_PATH) && \ $(CMAKE) -G $(OSGEARTH_CMAKE_GENERATOR) -DCMAKE_BUILD_TYPE=$(OSGEARTH_BUILD_CONF) \ -DOSGEARTH_USE_QT=ON \ -DINSTALL_TO_OSG_DIR=OFF \ From 3ca26341099c958a204039a0034c4c97f6e40d33 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Tue, 8 Sep 2015 23:15:24 +0200 Subject: [PATCH 09/21] LP-30 don't copy now non existant googlesat/bicycle --- make/3rdparty/marble/marble.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/make/3rdparty/marble/marble.mk b/make/3rdparty/marble/marble.mk index e060556d8..21cf5898f 100644 --- a/make/3rdparty/marble/marble.mk +++ b/make/3rdparty/marble/marble.mk @@ -91,7 +91,6 @@ marble: $(V1) $(CP) $(MARBLE_SRC_DIR)/googlesat/googlesat.dgml $(MARBLE_DATA_DIR)/maps/earth/googlesat/ $(V1) $(CP) $(MARBLE_SRC_DIR)/googlesat/preview.png $(MARBLE_DATA_DIR)/maps/earth/googlesat/ $(V1) $(CP) -R $(MARBLE_SRC_DIR)/googlesat/0 $(MARBLE_DATA_DIR)/maps/earth/googlesat/ - $(V1) $(CP) -R $(MARBLE_SRC_DIR)/googlesat/bicycle $(MARBLE_DATA_DIR)/maps/earth/googlesat/ $(V1) $(CP) -R $(MARBLE_SRC_DIR)/googlesat/streets $(MARBLE_DATA_DIR)/maps/earth/googlesat/ .PHONY: package_marble From c3fa476404251f8c1f48bb46101f7bcdf8a2fb42 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sat, 12 Sep 2015 18:55:35 +0200 Subject: [PATCH 10/21] LP-30 unset OSG_NOTIFY_LEVEL to avoid warning if not set properly --- make/3rdparty/osgearth/osgearth.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/make/3rdparty/osgearth/osgearth.mk b/make/3rdparty/osgearth/osgearth.mk index 837cb5d12..465053eb1 100644 --- a/make/3rdparty/osgearth/osgearth.mk +++ b/make/3rdparty/osgearth/osgearth.mk @@ -260,6 +260,7 @@ osgearth: PATH=$(OSGEARTH_BUILD_PATH) && \ LD_LIBRARY_PATH=$(OSGEARTH_LIB_PATH) && \ export DYLD_LIBRARY_PATH=$(OSG_LIB_PATH) && \ + unset OSG_NOTIFY_LEVEL && \ $(CMAKE) -G $(OSGEARTH_CMAKE_GENERATOR) -DCMAKE_BUILD_TYPE=$(OSGEARTH_BUILD_CONF) \ -DOSGEARTH_USE_QT=ON \ -DINSTALL_TO_OSG_DIR=OFF \ From bed35a1d331746ac29514e968bcebfc720e1a438 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sat, 12 Sep 2015 20:20:40 +0200 Subject: [PATCH 11/21] LP-30 osg : added proper win dependencies build script --- ...sgearth_dependencies_win.sh => osg_win.sh} | 108 +++++++++++++++--- 1 file changed, 93 insertions(+), 15 deletions(-) rename make/3rdparty/osgearth/{osgearth_dependencies_win.sh => osg_win.sh} (71%) diff --git a/make/3rdparty/osgearth/osgearth_dependencies_win.sh b/make/3rdparty/osgearth/osg_win.sh similarity index 71% rename from make/3rdparty/osgearth/osgearth_dependencies_win.sh rename to make/3rdparty/osgearth/osg_win.sh index b5f76643a..ed428b692 100644 --- a/make/3rdparty/osgearth/osgearth_dependencies_win.sh +++ b/make/3rdparty/osgearth/osg_win.sh @@ -1,29 +1,103 @@ -################################################################################ -#!/bin/bash +#!/bin/sh -e ################################################################################ # -# This script compiles GDAL and other dependencies needed by OSG and OSGEarth +# This script compiles OSG and OSGEarth dependencies (GDAL, GEOS, ...) +# +# Known to work with MSYS 1.0.11 +# A zip file is provided here http://librepilot.github.io/tools/MSYS-1.0.11.zip +# This zip is based on the official http://downloads.sourceforge.net/mingw/MSYS-1.0.11.exe +# It was generated by installing MSYS-1.0.11.exe and adding to it: +# - http://gnuwin32.sourceforge.net/packages/wget.htm +# - http://gnuwin32.sourceforge.net/packages/libintl.htm +# - http://gnuwin32.sourceforge.net/packages/libiconv.htm +# And finally zipping the resulting directory (minus Readme.txt) # # A good source for building with mingw : # http://www.gaia-gis.it/gaia-sins/mingw_how_to.html # +# Sample command line to execute this script from a MS shell : +# .\tools\msys\bin\sh --login -i -c /d/Projects/LibrePilot/make/3rdparty/osgearth/osg_win.sh +# +# Executing this script from git bash does not seem to work. +# ################################################################################ +# turn -x on if DEBUG is set to a non-empty string +[ -n "$DEBUG" ] && set -x + +################################################################################ +# MinGW +################################################################################ + +#MINGW_DIR=D:/Projects/LibrePilotTools/qt-5.4.1/Tools/mingw491_32 +if [ -z "$MINGW_DIR" ]; then + echo MINGW_DIR not defined. Exiting... + exit 1 +fi + +umount /mingw || true +mount $MINGW_DIR /mingw + ################################################################################ # Environment ################################################################################ -WORKING_DIR=$PWD +BASE_DIR=$(dirname $0) -# TODO this should not be hardwired -ROOT_DIR=/d/Projects/LibrePilot +WORK_DIR=$BASE_DIR +ROOT_DIR=$BASE_DIR/../../.. -DOWNLOAD_DIR=$ROOT_DIR/downloads/osgearth -SOURCE_DIR=$ROOT_DIR/3rdparty/osgearth_dependencies -BUILD_DIR=$ROOT_DIR/build/3rdparty/osgearth_dependencies +DOWNLOAD_DIR=$ROOT_DIR/downloads/osg +SOURCE_DIR=$ROOT_DIR/3rdparty/osg_dependencies +BUILD_DIR=$ROOT_DIR/build/3rdparty/osg_dependencies HOST=mingw32 +DOWNLOAD_FILES=1 + +echo Root dir : $ROOT_DIR +echo Work dir : $WORK_DIR +echo Build dir : $BUILD_DIR +echo MinGW dir : $MINGW_DIR + +################################################################################ +# download sources +################################################################################ + +if [ "$DOWNLOAD_FILES" -eq 1 ]; then + +SRC_FILES=" +http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz +http://zlib.net/zlib-1.2.8.tar.gz +http://www.ijg.org/files/jpegsrc.v9a.tar.gz +http://sourceforge.net/projects/libpng/files/libpng16/older-releases/1.6.16/libpng-1.6.16.tar.gz +ftp://ftp.remotesensing.org/pub/libtiff/tiff-4.0.3.tar.gz +http://sourceforge.net/projects/freetype/files/freetype2/2.5.3/freetype-2.5.3.tar.gz +http://curl.haxx.se/download/curl-7.38.0.tar.gz +http://download.osgeo.org/proj/proj-4.8.0.tar.gz +http://download.osgeo.org/proj/proj-datumgrid-1.5.tar.gz +http://download.osgeo.org/geos/geos-3.3.8.tar.bz2 +http://download.osgeo.org/gdal/1.10.1/gdal-1.10.1.tar.gz +" + +mkdir -p $DOWNLOAD_DIR/ +for f in $SRC_FILES +do + filename=$(basename "$f") + if [ ! -f $DOWNLOAD_DIR/$filename ]; then + echo "****************************************" + echo "Downloading $filename" + echo "****************************************" + wget -P $DOWNLOAD_DIR/ $f + fi +done + +fi + +################################################################################ +# build all +################################################################################ + # list of libraries to build # other candidates include bzip2, libxml2, gif, geotiff, ssl, gl... BUILD_PKGCONFIG=1 @@ -39,10 +113,15 @@ BUILD_GEOS=1 BUILD_GDAL=1 # TODO -# libcurl needs to be built with ssl support +# libcurl needs to be built with and ssl support # gdal does not seem to link with shared proj4 +# Clean src and build dirs +rm -rf $SOURCE_DIR/* +rm -rf $BUILD_DIR/* + mkdir -p $SOURCE_DIR/ +mkdir -p $BUILD_DIR/ mkdir -p $BUILD_DIR/bin/ mkdir -p $BUILD_DIR/include/ mkdir -p $BUILD_DIR/lib/ @@ -53,7 +132,7 @@ export CPATH=$BUILD_DIR/include export LIBRARY_PATH=$BUILD_DIR/lib export PKG_CONFIG_PATH=$BUILD_DIR/lib/pkgconfig -# reduce binary sizes by removing the -g option (not picked up by all libraries) +# compiler flags export CFLAGS=-O2 export CXXFLAGS=-O2 @@ -138,8 +217,8 @@ echo "Building libpng..." echo "****************************************" cd $SOURCE_DIR -tar xzf $DOWNLOAD_DIR/libpng-1.6.14.tar.gz -C . -cd libpng-1.6.14 +tar xzf $DOWNLOAD_DIR/libpng-1.6.16.tar.gz -C . +cd libpng-1.6.16 ./configure --prefix=$BUILD_DIR --build=$HOST make @@ -294,7 +373,7 @@ tar xzf $DOWNLOAD_DIR/gdal-1.10.1.tar.gz -C . cd gdal-1.10.1 # fix GNUmakefile as described here http://trac.osgeo.org/gdal/wiki/BuildingWithMinGW -patch < $WORKING_DIR/gdal_GNUmakefile_fix.patch +patch < $WORK_DIR/gdal_GNUmakefile_fix.patch ./configure --prefix=$BUILD_DIR --build=$HOST \ --without-python --without-libtool \ @@ -307,4 +386,3 @@ make install fi -################################################################################ From e8f8a52600e19ac756d752659c63103b4fb309a1 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Tue, 15 Sep 2015 22:12:30 +0200 Subject: [PATCH 12/21] LP-30 fixed list of unix dev libs required to build osg/osgearth --- make/3rdparty/osgearth/osgearth.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/make/3rdparty/osgearth/osgearth.mk b/make/3rdparty/osgearth/osgearth.mk index 465053eb1..c6383c4e2 100644 --- a/make/3rdparty/osgearth/osgearth.mk +++ b/make/3rdparty/osgearth/osgearth.mk @@ -14,10 +14,10 @@ # - geos # - gdal # -# $ sudo apt-get build-dep openscenegraph +# $ sudo apt-get install libzip-dev libpng-dev lipjpeg-dev libtiff5-dev libcurl4-openssl-dev libgeos++-dev libgdal-dev # -# $ sudo apt-get install libtiff5-dev libcurl4-openssl-dev libgeos++-dev libgdal-dev -# libpng-dev lipjpeg-dev +# Alternative (not tested) +# $ sudo apt-get build-dep openscenegraph # # $ 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 From 4891f7c5abee1608d3a915c955d48081621d3be0 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Tue, 15 Sep 2015 22:13:30 +0200 Subject: [PATCH 13/21] LP-30 fixed DYLD_LIBRARY_PATH used when building osgearth on osx --- make/3rdparty/osgearth/osgearth.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make/3rdparty/osgearth/osgearth.mk b/make/3rdparty/osgearth/osgearth.mk index c6383c4e2..c880a365a 100644 --- a/make/3rdparty/osgearth/osgearth.mk +++ b/make/3rdparty/osgearth/osgearth.mk @@ -259,7 +259,7 @@ osgearth: $(V1) ( $(CD) $(OSGEARTH_BUILD_DIR) && \ PATH=$(OSGEARTH_BUILD_PATH) && \ LD_LIBRARY_PATH=$(OSGEARTH_LIB_PATH) && \ - export DYLD_LIBRARY_PATH=$(OSG_LIB_PATH) && \ + export DYLD_LIBRARY_PATH=$(OSGEARTH_LIB_PATH) && \ unset OSG_NOTIFY_LEVEL && \ $(CMAKE) -G $(OSGEARTH_CMAKE_GENERATOR) -DCMAKE_BUILD_TYPE=$(OSGEARTH_BUILD_CONF) \ -DOSGEARTH_USE_QT=ON \ From 8f868d9e3539a56907ded93a30abd79c5a1e1050 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Fri, 25 Sep 2015 23:36:25 +0200 Subject: [PATCH 14/21] LP-30 fixed some pathes --- make/3rdparty/marble/marble.mk | 4 ++-- make/3rdparty/osgearth/osgearth.mk | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/make/3rdparty/marble/marble.mk b/make/3rdparty/marble/marble.mk index 21cf5898f..3acb4fa8f 100644 --- a/make/3rdparty/marble/marble.mk +++ b/make/3rdparty/marble/marble.mk @@ -66,7 +66,7 @@ MARBLE_SRC_DIR := $(ROOT_DIR)/3rdparty/marble MARBLE_BUILD_DIR := $(BUILD_DIR)/3rdparty/$(MARBLE_NAME) MARBLE_INSTALL_DIR := $(BUILD_DIR)/3rdparty/install/$(MARBLE_NAME) MARBLE_DATA_DIR := $(MARBLE_INSTALL_DIR)/$(MARBLE_DATA_BASE_DIR) -MARBLE_PATCH_FILE := $(ROOT_DIR)/make/3rdparty/marble-$(MARBLE_VERSION).patch +MARBLE_PATCH_FILE := $(ROOT_DIR)/make/3rdparty/marble/marble-$(MARBLE_VERSION).patch .PHONY: marble marble: @@ -96,7 +96,7 @@ marble: .PHONY: package_marble package_marble: @$(ECHO) "Packaging $(call toprel, $(MARBLE_INSTALL_DIR)) into $(notdir $(MARBLE_INSTALL_DIR)).tar" - #$(V1) $(CP) $(ROOT_DIR)/make/3rdparty/LibrePilotReadme.txt $(MARBLE_INSTALL_DIR)/ + #$(V1) $(CP) $(ROOT_DIR)/make/3rdparty/marble/LibrePilotReadme.txt $(MARBLE_INSTALL_DIR)/ $(V1) ( \ $(CD) $(MARBLE_INSTALL_DIR)/.. && \ $(TAR) cf $(notdir $(MARBLE_INSTALL_DIR)).tar $(notdir $(MARBLE_INSTALL_DIR)) && \ diff --git a/make/3rdparty/osgearth/osgearth.mk b/make/3rdparty/osgearth/osgearth.mk index c880a365a..8553a8f93 100644 --- a/make/3rdparty/osgearth/osgearth.mk +++ b/make/3rdparty/osgearth/osgearth.mk @@ -123,7 +123,7 @@ 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/osg-$(OSG_VERSION).patch +OSG_PATCH_FILE := $(ROOT_DIR)/make/3rdparty/osgearth/osg-$(OSG_VERSION).patch .PHONY: osg osg: @@ -150,7 +150,7 @@ osg: .PHONY: package_osg package_osg: @$(ECHO) "Packaging $(call toprel, $(OSG_INSTALL_DIR)) into $(notdir $(OSG_INSTALL_DIR)).tar" - #$(V1) $(CP) $(ROOT_DIR)/make/3rdparty/LibrePilotReadme.txt $(OSG_INSTALL_DIR)/ + #$(V1) $(CP) $(ROOT_DIR)/make/3rdparty/osgearth/LibrePilotReadme.txt $(OSG_INSTALL_DIR)/ $(V1) ( \ $(CD) $(OSG_INSTALL_DIR)/.. && \ $(TAR) cf $(notdir $(OSG_INSTALL_DIR)).tar $(notdir $(OSG_INSTALL_DIR)) && \ @@ -250,7 +250,7 @@ OSGEARTH_BUILD_DIR := $(BUILD_DIR)/3rdparty/$(OSGEARTH_NAME) # osgearth will be installed into osg (there is an official option to do that but it seems broken on mingw) #OSGEARTH_INSTALL_DIR := $(BUILD_DIR)/3rdparty/install/$(OSGEARTH_NAME) OSGEARTH_INSTALL_DIR := $(OSG_INSTALL_DIR) -OSGEARTH_PATCH_FILE := $(ROOT_DIR)/make/3rdparty/osgearth-$(OSGEARTH_VERSION).patch +OSGEARTH_PATCH_FILE := $(ROOT_DIR)/make/3rdparty/osgearth/osgearth-$(OSGEARTH_VERSION).patch .PHONY: osgearth osgearth: From 445ca8c5ae8f565b512656d80a09904d03c052c5 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Fri, 25 Sep 2015 23:38:24 +0200 Subject: [PATCH 15/21] LP-30 set marble version to 15.08.1 and added patch to fix windows compilation issue --- make/3rdparty/marble/marble-15.08.1.patch | 13 +++++++++++++ make/3rdparty/marble/marble.mk | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 make/3rdparty/marble/marble-15.08.1.patch diff --git a/make/3rdparty/marble/marble-15.08.1.patch b/make/3rdparty/marble/marble-15.08.1.patch new file mode 100644 index 000000000..c18352060 --- /dev/null +++ b/make/3rdparty/marble/marble-15.08.1.patch @@ -0,0 +1,13 @@ +diff --git a/src/apps/marble-qt/QtMainWindow.cpp b/src/apps/marble-qt/QtMainWindow.cpp +index da9f44f..b3f4ee3 100644 +--- a/src/apps/marble-qt/QtMainWindow.cpp ++++ b/src/apps/marble-qt/QtMainWindow.cpp +@@ -432,7 +432,7 @@ void MainWindow::createActions() + void MainWindow::createMenus( const QList &panelActions ) + { + #ifdef Q_OS_WIN +- m_downloadAction.setEnabled( false ); ++ m_downloadAction->setEnabled( false ); + #endif + + m_fileMenu = menuBar()->addMenu(tr("&File")); diff --git a/make/3rdparty/marble/marble.mk b/make/3rdparty/marble/marble.mk index 3acb4fa8f..d8b973c3c 100644 --- a/make/3rdparty/marble/marble.mk +++ b/make/3rdparty/marble/marble.mk @@ -31,8 +31,8 @@ MARBLE_NAME_SUFIX := -qt-$(QT_VERSION) # ################################ -MARBLE_VERSION := master -MARBLE_GIT_BRANCH := $(MARBLE_VERSION) +MARBLE_VERSION := 15.08.1 +MARBLE_GIT_BRANCH := v$(MARBLE_VERSION) MARBLE_BASE_NAME := marble-$(MARBLE_VERSION) MARBLE_BUILD_CONF := Release From 3a5ba9ad58aa3b2e628cec5b5d70cf9e8b01a17c Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sat, 12 Sep 2015 22:23:30 +0200 Subject: [PATCH 16/21] LP-30 fixed marble --- make/3rdparty/marble/marble.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/make/3rdparty/marble/marble.mk b/make/3rdparty/marble/marble.mk index d8b973c3c..9d27f57d9 100644 --- a/make/3rdparty/marble/marble.mk +++ b/make/3rdparty/marble/marble.mk @@ -74,7 +74,7 @@ marble: $(V1) $(MKDIR) -p $(MARBLE_BUILD_DIR) $(V1) ( $(CD) $(MARBLE_BUILD_DIR) && \ PATH=$(MARBLE_BUILD_PATH) && \ - $(CMAKE) -G $(MARBLE_CMAKE_GENERATOR) -DCMAKE_BUILD_TYPE=$(MARBLE_BUILD_CONF) \ + $(CMAKE) -Wno-dev -G $(MARBLE_CMAKE_GENERATOR) -DCMAKE_BUILD_TYPE=$(MARBLE_BUILD_CONF) \ -DQTONLY=1 -DQT5BUILD=1 -DWITH_DESIGNER_PLUGIN=0 \ -DCMAKE_INSTALL_PREFIX=$(MARBLE_INSTALL_DIR) $(MARBLE_SRC_DIR) && \ $(MAKE) && \ @@ -116,7 +116,8 @@ clone_marble: fi @$(ECHO) "Fetching marble..." $(V1) ( $(CD) $(MARBLE_SRC_DIR) && $(GIT) fetch ; ) - @$(ECHO) "Checking out marble branch $(MARBLE_GIT_BRANCH)" + @$(ECHO) "Checking out marble $(MARBLE_GIT_BRANCH)" + $(V1) ( $(CD) $(MARBLE_SRC_DIR) && $(GIT) fetch --tags ; ) $(V1) ( $(CD) $(MARBLE_SRC_DIR) && $(GIT) checkout --quiet --force $(MARBLE_GIT_BRANCH) ; ) $(V1) if [ -e $(MARBLE_PATCH_FILE) ]; then \ $(ECHO) "Patching marble..." ; \ From a25b31b7431b747a39ec7d9c8f9fa5da1989290f Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Tue, 29 Sep 2015 21:44:20 +0200 Subject: [PATCH 17/21] LP-30 upgraded google sat version via patch --- make/3rdparty/marble/googlesat.patch | 13 +++++++++++++ make/3rdparty/marble/marble.mk | 6 ++++++ 2 files changed, 19 insertions(+) create mode 100644 make/3rdparty/marble/googlesat.patch diff --git a/make/3rdparty/marble/googlesat.patch b/make/3rdparty/marble/googlesat.patch new file mode 100644 index 000000000..05b10bba1 --- /dev/null +++ b/make/3rdparty/marble/googlesat.patch @@ -0,0 +1,13 @@ +diff --git a/googlesat.dgml b/googlesat.dgml +index 6e9fbd3..42f5e72 100644 +--- a/googlesat.dgml ++++ b/googlesat.dgml +@@ -26,7 +26,7 @@ + earth/googlesat + + +- ++ + + + earth/googlesat/streets diff --git a/make/3rdparty/marble/marble.mk b/make/3rdparty/marble/marble.mk index 9d27f57d9..f407cd9ee 100644 --- a/make/3rdparty/marble/marble.mk +++ b/make/3rdparty/marble/marble.mk @@ -68,6 +68,8 @@ MARBLE_INSTALL_DIR := $(BUILD_DIR)/3rdparty/install/$(MARBLE_NAME) MARBLE_DATA_DIR := $(MARBLE_INSTALL_DIR)/$(MARBLE_DATA_BASE_DIR) MARBLE_PATCH_FILE := $(ROOT_DIR)/make/3rdparty/marble/marble-$(MARBLE_VERSION).patch +GOOGLE_SAT_PATCH_FILE := $(ROOT_DIR)/make/3rdparty/marble/googlesat.patch + .PHONY: marble marble: @$(ECHO) "Building marble $(call toprel, $(MARBLE_SRC_DIR)) into $(call toprel, $(MARBLE_BUILD_DIR))" @@ -141,6 +143,10 @@ clone_marble: $(V1) ( $(CD) $(MARBLE_SRC_DIR)/googlesat && $(GIT) fetch ; ) @$(ECHO) "Checking out googlesat" $(V1) ( $(CD) $(MARBLE_SRC_DIR)/googlesat && $(GIT) checkout --quiet --force master ; ) + $(V1) if [ -e $(GOOGLE_SAT_PATCH_FILE) ]; then \ + $(ECHO) "Patching google sat..." ; \ + ( $(CD) $(MARBLE_SRC_DIR)/googlesat && $(GIT) apply $(GOOGLE_SAT_PATCH_FILE) ; ) \ + fi .PHONY: clean_marble clean_marble: From 73d15be2c1610880cfd6a4761868f307d1820ee0 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sat, 17 Oct 2015 12:35:16 +0200 Subject: [PATCH 18/21] LP-30 added short readme describing how to build osgEarth --- make/3rdparty/osgearth/README.TXT | 63 +++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 make/3rdparty/osgearth/README.TXT diff --git a/make/3rdparty/osgearth/README.TXT b/make/3rdparty/osgearth/README.TXT new file mode 100644 index 000000000..14d8d22e7 --- /dev/null +++ b/make/3rdparty/osgearth/README.TXT @@ -0,0 +1,63 @@ +This document describes how to build osg and osgEarth. + + +Building osgEarth requires: +* osgEarth (http://osgearth.org/) +* OpenSceneGraph (http://www.openscenegraph.org/) +* GDAL (http://www.gdal.org/) +* zlib, png, etc... + + +Make sure all LibrePilot SDKs are up to date as the osgEarth build relies on them. + + +More details can be found in osgearth.mk. + +Linux prerequisites +---------------------------------- + +$ sudo apt-get install libzip-dev libpng-dev lipjpeg-dev libtiff5-dev libcurl4-openssl-dev +$ 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 +---------------------------------- + +brew install cmake +brew install gdal + +Windows prerequisites +---------------------------------- + +Windows requires many libraries to be build. + +See osg_win.sh for more details. + + +Building +---------------------------------- + +$ make all_osg + + +This will: +- clone git repositories in ./3rdparty +- build osg and osgEarth libraries in ./build/3rdparty +- install osg in ./build/3rdparty/install +- create distribution files (tar & md5) in ./build/3rdparty/install \ No newline at end of file From a3a7d551769369f03308d2605683b8153e0a0519 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Mon, 2 Nov 2015 23:59:11 +0100 Subject: [PATCH 19/21] LP-30 fixed PATH issue on windows after switching to git for windows 2.6.2 apparently environment variables, like TOOLS_DIR, set in .bashrc are messed up now (/d/path becomes D:/path) a workaround is to set them in the Makefile config file --- make/3rdparty/osgearth/osgearth.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/make/3rdparty/osgearth/osgearth.mk b/make/3rdparty/osgearth/osgearth.mk index 8553a8f93..eecff9bb1 100644 --- a/make/3rdparty/osgearth/osgearth.mk +++ b/make/3rdparty/osgearth/osgearth.mk @@ -116,7 +116,7 @@ else ifeq ($(UNAME), Windows) OSG_NAME := $(OSG_BASE_NAME)-$(QT_SDK_ARCH) OSG_CMAKE_GENERATOR := "MinGW Makefiles" # CMake is quite picky about its PATH and will complain if sh.exe is found in it - OSG_BUILD_PATH := "$(TOOLS_DIR)/bin;$(QT_SDK_PREFIX)/bin;$(MINGW_DIR)/bin" + OSG_BUILD_PATH := $(MINGW_DIR)/bin:$(QT_SDK_PREFIX)/bin endif OSG_NAME := $(OSG_NAME_PREFIX)$(OSG_NAME)$(OSG_NAME_SUFIX) @@ -240,7 +240,7 @@ else ifeq ($(UNAME), Windows) OSGEARTH_NAME := $(OSGEARTH_BASE_NAME)-$(QT_SDK_ARCH) OSGEARTH_CMAKE_GENERATOR := "MinGW Makefiles" # CMake is quite picky about its PATH and will complain if sh.exe is found in it - OSGEARTH_BUILD_PATH := "$(TOOLS_DIR)/bin;$(QT_SDK_PREFIX)/bin;$(MINGW_DIR)/bin;$(OSG_INSTALL_DIR)/bin" + OSGEARTH_BUILD_PATH := $(MINGW_DIR)/bin:$(QT_SDK_PREFIX)/bin:$(OSG_INSTALL_DIR)/bin OSGEARTH_LIB_PATH := $(OSG_INSTALL_DIR)/lib endif From 57e1122f4ce67f931c2ab912df5aea2e9e5ac93e Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Tue, 3 Nov 2015 00:42:49 +0100 Subject: [PATCH 20/21] LP-30 disable compilation of osgWrappers/deprecated-dotosg --- make/3rdparty/osgearth/README.TXT | 4 ++-- make/3rdparty/osgearth/osg-3.4.patch | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 make/3rdparty/osgearth/osg-3.4.patch diff --git a/make/3rdparty/osgearth/README.TXT b/make/3rdparty/osgearth/README.TXT index 14d8d22e7..decd6705d 100644 --- a/make/3rdparty/osgearth/README.TXT +++ b/make/3rdparty/osgearth/README.TXT @@ -1,4 +1,4 @@ -This document describes how to build osg and osgEarth. +This document describes how to build osg and osgEarth. Building osgEarth requires: @@ -60,4 +60,4 @@ This will: - clone git repositories in ./3rdparty - build osg and osgEarth libraries in ./build/3rdparty - install osg in ./build/3rdparty/install -- create distribution files (tar & md5) in ./build/3rdparty/install \ No newline at end of file +- create distribution files (tar & md5) in ./build/3rdparty/install diff --git a/make/3rdparty/osgearth/osg-3.4.patch b/make/3rdparty/osgearth/osg-3.4.patch new file mode 100644 index 000000000..cd6b8f168 --- /dev/null +++ b/make/3rdparty/osgearth/osg-3.4.patch @@ -0,0 +1,12 @@ +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 + ) + From 8f2bebc4a2cf74e1f3686306060505b54077c062 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Thu, 5 Nov 2015 08:43:31 +0100 Subject: [PATCH 21/21] LP-30 README.text cleanup --- make/3rdparty/osgearth/README.TXT | 117 ++++++++++++++---------------- 1 file changed, 54 insertions(+), 63 deletions(-) diff --git a/make/3rdparty/osgearth/README.TXT b/make/3rdparty/osgearth/README.TXT index decd6705d..d70669d37 100644 --- a/make/3rdparty/osgearth/README.TXT +++ b/make/3rdparty/osgearth/README.TXT @@ -1,63 +1,54 @@ -This document describes how to build osg and osgEarth. - - -Building osgEarth requires: -* osgEarth (http://osgearth.org/) -* OpenSceneGraph (http://www.openscenegraph.org/) -* GDAL (http://www.gdal.org/) -* zlib, png, etc... - - -Make sure all LibrePilot SDKs are up to date as the osgEarth build relies on them. - - -More details can be found in osgearth.mk. - -Linux prerequisites ----------------------------------- - -$ sudo apt-get install libzip-dev libpng-dev lipjpeg-dev libtiff5-dev libcurl4-openssl-dev -$ 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 ----------------------------------- - -brew install cmake -brew install gdal - -Windows prerequisites ----------------------------------- - -Windows requires many libraries to be build. - -See osg_win.sh for more details. - - -Building ----------------------------------- - -$ make all_osg - - -This will: -- clone git repositories in ./3rdparty -- build osg and osgEarth libraries in ./build/3rdparty -- install osg in ./build/3rdparty/install -- create distribution files (tar & md5) in ./build/3rdparty/install +This document describes how to build osg and osgEarth. + +Building osgEarth requires: +* osgEarth (http://osgearth.org/) +* OpenSceneGraph (http://www.openscenegraph.org/) +* GDAL (http://www.gdal.org/) +* zlib, png, etc... + +Make sure all LibrePilot SDKs are up to date as the osgEarth build relies on them. + +More details can be found in osgearth.mk. + + +Linux prerequisites +---------------------------------- + +$ sudo apt-get install libzip-dev libpng-dev lipjpeg-dev libtiff5-dev libcurl4-openssl-dev +$ 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 +---------------------------------- + +brew install cmake +brew install gdal + +Windows prerequisites +---------------------------------- + +Windows requires many libraries to be build. +See osg_win.sh for more details. + + +Building +---------------------------------- + +$ make all_osg + +This will: +- clone git repositories in ./3rdparty +- build osg and osgEarth libraries in ./build/3rdparty +- install osg in ./build/3rdparty/install +- create distribution files (tar & md5) in ./build/3rdparty/install