summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Android-Clang.cmake
diff options
context:
space:
mode:
authorButta <gl@butta.fastem.com>2019-10-15 07:54:02 (GMT)
committerButta <gl@butta.fastem.com>2019-10-15 15:43:51 (GMT)
commitc5892e484e21f49abf2afd138dddd6720bf91adc (patch)
tree71895167fb4b068785a68f06c0a5ca339df57eca /Modules/Platform/Android-Clang.cmake
parentdaf6a6ba68a6fa1c5d1956f151104d903f3447cc (diff)
downloadCMake-c5892e484e21f49abf2afd138dddd6720bf91adc.zip
CMake-c5892e484e21f49abf2afd138dddd6720bf91adc.tar.gz
CMake-c5892e484e21f49abf2afd138dddd6720bf91adc.tar.bz2
Android: add support for native compilation, such as with the Termux app
The CMake support for Android assumes cross-compilation using the NDK, so stub out that Android NDK support and use the Linux support that's already invoked. Set CMAKE_HOST_SYSTEM_NAME to "Android", rather than "Linux". Issue: #19840
Diffstat (limited to 'Modules/Platform/Android-Clang.cmake')
-rw-r--r--Modules/Platform/Android-Clang.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/Platform/Android-Clang.cmake b/Modules/Platform/Android-Clang.cmake
index 847178f..759448b 100644
--- a/Modules/Platform/Android-Clang.cmake
+++ b/Modules/Platform/Android-Clang.cmake
@@ -24,6 +24,14 @@ if(CMAKE_SYSTEM_VERSION EQUAL 1)
return()
endif()
+# Natively compiling on an Android host doesn't use the NDK cross-compilation
+# tools.
+if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Android")
+ macro(__android_compiler_clang lang)
+ endmacro()
+ return()
+endif()
+
include(Platform/Android-Common)
# The NDK toolchain configuration files at: