mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-27 03:08:35 -06: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:
@@ -2,6 +2,11 @@ include(Platform/Linux)
|
||||
|
||||
set(ANDROID 1)
|
||||
|
||||
# Natively compiling on an Android host doesn't need these flags to be reset.
|
||||
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Android")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Conventionally Android does not use versioned soname
|
||||
# But in modern versions it is acceptable
|
||||
if(NOT DEFINED CMAKE_PLATFORM_NO_VERSIONED_SONAME)
|
||||
|
||||
Reference in New Issue
Block a user