From c2dcb97d06b41903ab91e5c8d213f008f89b26de Mon Sep 17 00:00:00 2001 From: Greg Wicks Date: Tue, 7 Nov 2017 10:47:54 -0500 Subject: [PATCH] Android: Fix NDK r16b2 build --- CMakeLists.txt | 8 +++++--- Source/Core/Common/Compat/optional | 2 +- Source/Core/Common/Compat/variant | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 98d2b6a865..568f9d62d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -709,10 +709,12 @@ else() include_directories(Externals/SOIL) endif() -find_library(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c) -find_path(ICONV_INCLUDE_DIR NAMES iconv.h) +if (NOT ANDROID) + find_library(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c) + find_path(ICONV_INCLUDE_DIR NAMES iconv.h) +endif() -if (ICONV_LIBRARIES AND ICONV_INCLUDE_DIR) +if (NOT ANDROID AND ICONV_LIBRARIES AND ICONV_INCLUDE_DIR) mark_as_advanced(ICONV_INCLUDE_DIR ICONV_LIBRARIES) else() message(STATUS "Using static iconv from Externals") diff --git a/Source/Core/Common/Compat/optional b/Source/Core/Common/Compat/optional index 4f7598da6d..1da42ff4d2 100644 --- a/Source/Core/Common/Compat/optional +++ b/Source/Core/Common/Compat/optional @@ -4,7 +4,7 @@ #pragma once -#if __has_include_next() +#if __cplusplus >= 201703L && __has_include_next() #include_next #else /* Copyright 2017 The TensorFlow Authors. All Rights Reserved. diff --git a/Source/Core/Common/Compat/variant b/Source/Core/Common/Compat/variant index dfe6bd0ed7..dc32b6806f 100644 --- a/Source/Core/Common/Compat/variant +++ b/Source/Core/Common/Compat/variant @@ -4,7 +4,7 @@ #pragma once -#if __has_include_next() +#if __cplusplus >= 201703L && __has_include_next() #include_next #else // MPark.Variant