summaryrefslogtreecommitdiff
path: root/Modules/Platform
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-10-19 13:55:43 +0000
committerKitware Robot <kwrobot@kitware.com>2022-10-19 09:55:59 -0400
commit077e42fe7648f4ef5c9741e7a1e085ee6c8685ab (patch)
treefad4e0b78ea25a0bd81c104872202f791c3ad190 /Modules/Platform
parent20587e5af99307a1f8a88ffac5733d8f79a5cc99 (diff)
parent7e5b48a7b105707cba16fcc2c10f422df6d06c4f (diff)
downloadcmake-077e42fe7648f4ef5c9741e7a1e085ee6c8685ab.tar.gz
Merge topic 'android-path-suffixes' into release-3.25
7e5b48a7b1 Android: Avoid searching API level directories matching architecture bitness Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7805
Diffstat (limited to 'Modules/Platform')
-rw-r--r--Modules/Platform/Android.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/Platform/Android.cmake b/Modules/Platform/Android.cmake
index 6944e32200..09a12ccb55 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)