diff options
author | Sergiu Deitsch <sergiu.deitsch@gmail.com> | 2022-10-18 17:07:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-10-18 18:21:51 (GMT) |
commit | 7e5b48a7b105707cba16fcc2c10f422df6d06c4f (patch) | |
tree | 435e4c0f75971e085e12d9e3eeecad0ef34181ec /Modules/Platform/Android.cmake | |
parent | 9fefa9ef49061c7fc572bb21e37a2349d716a860 (diff) | |
download | CMake-7e5b48a7b105707cba16fcc2c10f422df6d06c4f.zip CMake-7e5b48a7b105707cba16fcc2c10f422df6d06c4f.tar.gz CMake-7e5b48a7b105707cba16fcc2c10f422df6d06c4f.tar.bz2 |
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
Diffstat (limited to 'Modules/Platform/Android.cmake')
-rw-r--r-- | Modules/Platform/Android.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/Platform/Android.cmake b/Modules/Platform/Android.cmake index 6944e32..09a12cc 100644 --- a/Modules/Platform/Android.cmake +++ b/Modules/Platform/Android.cmake @@ -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) |