mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-24 16:49:18 -06:00
Merge topic 'android-ndk-legacy-toolchain'
cb0b9452e8 Android: Provide CMAKE_ANDROID_NDK_VERSION with NDK legacy toolchain file
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8170
This commit is contained in:
@@ -80,7 +80,7 @@ else()
|
||||
set(CMAKE_${lang}_COMPILE_OPTIONS_IPO "-flto")
|
||||
endif()
|
||||
|
||||
if(ANDROID AND CMAKE_ANDROID_NDK_VERSION VERSION_LESS "22")
|
||||
if(ANDROID AND NOT CMAKE_ANDROID_NDK_VERSION VERSION_GREATER_EQUAL "22")
|
||||
# https://github.com/android-ndk/ndk/issues/242
|
||||
set(CMAKE_${lang}_LINK_OPTIONS_IPO "-fuse-ld=gold")
|
||||
endif()
|
||||
|
||||
@@ -39,6 +39,8 @@ 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)
|
||||
# The NDK legacy toolchain file provides its version number.
|
||||
set(CMAKE_ANDROID_NDK_VERSION ${ANDROID_NDK_MAJOR}.${ANDROID_NDK_MINOR})
|
||||
return()
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user