This file is part of MXE. See LICENSE.md for licensing information.

Contains ad hoc patches for cross building.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Pek <tehnick-8@yandex.ru>
Date: Thu, 22 Mar 2018 22:40:00 +0300
Subject: [PATCH 1/2] Added cmake options for disabling building of
 applications and tests


diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1111111..2222222 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -326,6 +326,10 @@ ENDIF(INSTALL_TO_OSG_DIR)
 # osgEarth Examples
 OPTION(BUILD_OSGEARTH_EXAMPLES "Enable to build osgEarth Examples" ON)
 
+# Applications and tests
+OPTION(BUILD_APPLICATIONS "Enable build of Applications" ON)
+OPTION(BUILD_TESTS "Enable build of Tests" ON)
+
 # OE Core
 ADD_SUBDIRECTORY(src)
 
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1111111..2222222 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -23,11 +23,11 @@ ENDFOREACH( lib )
 
 ADD_SUBDIRECTORY( osgEarthDrivers )
 
-IF(NOT ANDROID)
+IF(BUILD_APPLICATIONS AND NOT ANDROID)
     ADD_SUBDIRECTORY( applications )
 ENDIF()
 
-IF(NOT OSGEARTH_BUILD_PLATFORM_IPHONE AND NOT OSGEARTH_BUILD_PLATFORM_IPHONE_SIMULATOR)
+IF(BUILD_TESTS AND NOT OSGEARTH_BUILD_PLATFORM_IPHONE AND NOT OSGEARTH_BUILD_PLATFORM_IPHONE_SIMULATOR)
     ADD_SUBDIRECTORY( tests )
 ENDIF()