mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-02 04:09:33 -05:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user