Browse Source

Merge topic 'android-path-suffixes' into release-3.25

7e5b48a7b1 Android: Avoid searching API level directories matching architecture bitness

Acked-by: Kitware Robot <[email protected]>
Merge-request: !7805
Brad King 3 years ago
parent
commit
077e42fe76
1 changed files with 6 additions and 0 deletions
  1. 6 0
      Modules/Platform/Android.cmake

+ 6 - 0
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)