mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-03 21:00:01 -05:00
Android: Avoid interfering with common pre-existing toolchain files
Commonly used Android toolchain files that pre-date CMake upstream support may need to be updated to work with our new functionality. They typically set CMAKE_SYSTEM_VERSION to 1, so detect that and skip our upstream Android settings. When such toolchain files are updated to account for our upstream support, they can then set CMAKE_SYSTEM_VERSION to a valid Android API and get new behavior.
This commit is contained in:
@@ -26,6 +26,14 @@ if(CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Commonly used Android toolchain files that pre-date CMake upstream support
|
||||
# set CMAKE_SYSTEM_VERSION to 1. Avoid interfering with them.
|
||||
if(CMAKE_SYSTEM_VERSION EQUAL 1)
|
||||
macro(__android_determine_compiler lang)
|
||||
endmacro()
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Identify the host platform.
|
||||
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
|
||||
set(_ANDROID_HOST_EXT "")
|
||||
|
||||
Reference in New Issue
Block a user