瀏覽代碼

Merge topic 'android-versioned-soname'

64e2c14c4a Android: allow user to enable versioned soname

Acked-by: Kitware Robot <[email protected]>
Merge-request: !3063
Brad King 6 年之前
父節點
當前提交
d564d06194
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. 5 3
      Modules/Platform/Android.cmake

+ 5 - 3
Modules/Platform/Android.cmake

@@ -2,9 +2,11 @@ include(Platform/Linux)
 
 set(ANDROID 1)
 
-# Android has soname, but binary names must end in ".so" so we cannot append
-# a version number.  Also we cannot portably represent symlinks on the host.
-set(CMAKE_PLATFORM_NO_VERSIONED_SONAME 1)
+# Conventionally Android does not use versioned soname
+# But in modern versions it is acceptable
+if(NOT DEFINED CMAKE_PLATFORM_NO_VERSIONED_SONAME)
+  set(CMAKE_PLATFORM_NO_VERSIONED_SONAME 1)
+endif()
 
 # Android reportedly ignores RPATH, and we cannot predict the install
 # location anyway.