diff --git a/Makefile b/Makefile index d0d21a608..c6686557f 100644 --- a/Makefile +++ b/Makefile @@ -82,10 +82,6 @@ One of the project’s primary goals is to provide an open and collaborative env endef -# Set up default build configurations (debug | release) -GCS_BUILD_CONF := release -GOOGLE_API_VERSION := 14 - # Clean out undesirable variables from the environment and command-line # to remove the chance that they will cause problems with our build define SANITIZE_VAR @@ -149,6 +145,14 @@ endif export UAVOBJGENERATOR +# Set up default build configurations (debug | release) +GCS_BUILD_CONF := release +GCS_EXTRA_CONF := osg copy_osg + +ifeq ($(UNAME), Windows) + GCS_EXTRA_CONF += osgearth +endif + ############################## # # All targets diff --git a/ground/gcs/src/libs/libs.pro b/ground/gcs/src/libs/libs.pro index f3ff6213c..e1b355cf2 100644 --- a/ground/gcs/src/libs/libs.pro +++ b/ground/gcs/src/libs/libs.pro @@ -12,6 +12,6 @@ SUBDIRS = \ qwt \ sdlgamepad -exists( $(OSG_SDK_DIR) ) { +osg { SUBDIRS += osgearth } diff --git a/ground/gcs/src/libs/osgearth/copydata.pro b/ground/gcs/src/libs/osgearth/copydata.pro index 7c20f24d2..992f8e4c7 100644 --- a/ground/gcs/src/libs/osgearth/copydata.pro +++ b/ground/gcs/src/libs/osgearth/copydata.pro @@ -11,6 +11,10 @@ contains(QT_ARCH, x86_64) { LIB_DIR_NAME = lib } +!msys2:OSG_VERSION = 3.4.0 +msys2:OSG_VERSION = 3.5.1 + + osg:linux { # copy osg libraries data_copy.commands += $(MKDIR) $$GCS_LIBRARY_PATH/osg $$addNewline() diff --git a/ground/gcs/src/libs/osgearth/osgearth.pri b/ground/gcs/src/libs/osgearth/osgearth.pri index aa8db7927..3224d5e8a 100644 --- a/ground/gcs/src/libs/osgearth/osgearth.pri +++ b/ground/gcs/src/libs/osgearth/osgearth.pri @@ -1,7 +1,8 @@ -exists( $(OSG_SDK_DIR) ) { +osg { DEFINES += USE_OSG LIBS *= -l$$qtLibraryName(GCSOsgEarth) } -exists( $(OSGEARTH_SDK_DIR) ) { + +osgearth { DEFINES += USE_OSGEARTH } diff --git a/ground/gcs/src/libs/osgearth/osgearth.pro b/ground/gcs/src/libs/osgearth/osgearth.pro index baa32911c..951c42109 100644 --- a/ground/gcs/src/libs/osgearth/osgearth.pro +++ b/ground/gcs/src/libs/osgearth/osgearth.pro @@ -4,17 +4,6 @@ DEFINES += OSGEARTH_LIBRARY #CONFIG += mys2 -CONFIG += osg -#CONFIG += osgQt - -exists( $(OSGEARTH_SDK_DIR) ) { - CONFIG += osgearth - #CONFIG += osgearthQt -} - -!msys2:OSG_VERSION = 3.4.0 -msys2:OSG_VERSION = 3.5.1 - osg:DEFINES += USE_OSG osgQt:DEFINES += USE_OSG_QT @@ -86,4 +75,4 @@ osgearth:SOURCES += \ osgQtQuick/OSGModelNode.cpp \ osgQtQuick/OSGSkyNode.cpp -include(copydata.pro) +copy_osg:include(copydata.pro)