summaryrefslogtreecommitdiff
path: root/vendor/optional.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/optional.cmake')
-rw-r--r--vendor/optional.cmake7
1 files changed, 3 insertions, 4 deletions
diff --git a/vendor/optional.cmake b/vendor/optional.cmake
index 157ccc991d..fa299da6a6 100644
--- a/vendor/optional.cmake
+++ b/vendor/optional.cmake
@@ -1,9 +1,8 @@
add_library(optional INTERFACE)
-# This polyfill is really only needed for
-# Windows. We need to be careful to not leak
-# it into any of our public interfaces.
-if(WIN32)
+# This polyfill is needed for Windows and Android since these standard libraries don't ship with
+# usable versions of <experimental/optional>
+if(WIN32 OR MBGL_PLATFORM STREQUAL "android")
target_include_directories(optional SYSTEM INTERFACE
${CMAKE_SOURCE_DIR}/vendor/optional/include
)