mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 10:50:16 -06:00
Android: Avoid searching API level directories matching architecture bitness
When cross-compiling for Android, the library path suffixes `/<number>/` refer to API level specific platform libraries instead of architecture bitness. Disable path suffix use under NDK to avoid incorrect inclusion of API level specific libraries below the targeted API level. Fixes: #23830
This commit is contained in:
committed by
Brad King
parent
9fefa9ef49
commit
7e5b48a7b1
@@ -13,6 +13,12 @@ if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Android")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# NDK organizes API level specific libraries in numbered subdirectories. To
|
||||
# avoid incorrect inclusion of libraries below the targeted API level, disable
|
||||
# architecture specific path suffixes by default.
|
||||
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS OFF)
|
||||
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS OFF)
|
||||
|
||||
# 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