diff options
author | Butta <gl@butta.fastem.com> | 2019-10-15 07:54:02 (GMT) |
---|---|---|
committer | Butta <gl@butta.fastem.com> | 2019-10-15 15:43:51 (GMT) |
commit | c5892e484e21f49abf2afd138dddd6720bf91adc (patch) | |
tree | 71895167fb4b068785a68f06c0a5ca339df57eca /Modules/Platform/Android-Determine.cmake | |
parent | daf6a6ba68a6fa1c5d1956f151104d903f3447cc (diff) | |
download | CMake-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-Determine.cmake')
-rw-r--r-- | Modules/Platform/Android-Determine.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/Platform/Android-Determine.cmake b/Modules/Platform/Android-Determine.cmake index e7c1b48..2225897 100644 --- a/Modules/Platform/Android-Determine.cmake +++ b/Modules/Platform/Android-Determine.cmake @@ -18,6 +18,12 @@ 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") + return() +endif() + cmake_policy(PUSH) cmake_policy(SET CMP0057 NEW) # if IN_LIST |