summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorleveldb Team <no-reply@google.com>2019-04-01 08:59:17 -0700
committerChris Mumford <cmumford@google.com>2019-04-01 09:04:40 -0700
commit37300aa54b8256dd2edfd504942eb2bd20823647 (patch)
tree7891737ad021787346add45e17d2cc1324e680a3 /CMakeLists.txt
parent56178ddaf4d3ba6c8d1cfb218610b1be3f5aa710 (diff)
downloadleveldb-37300aa54b8256dd2edfd504942eb2bd20823647.tar.gz
Restore soname versioning with CMake build
Before: $ readelf -d build/libleveldb.so | grep soname 0x000000000000000e (SONAME) Library soname: [libleveldb.so] After: $ readelf -d build/libleveldb.so | grep soname 0x000000000000000e (SONAME) Library soname: [libleveldb.so.1] This matches the soname from v1.20. PiperOrigin-RevId: 241334113
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e471a2a..ceb5dd9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -233,6 +233,10 @@ if(BUILD_SHARED_LIBS)
# Used by include/export.h.
LEVELDB_SHARED_LIBRARY
)
+ set_target_properties(leveldb
+ PROPERTIES VERSION ${PROJECT_VERSION})
+ set_target_properties(leveldb
+ PROPERTIES SOVERSION 1)
endif(BUILD_SHARED_LIBS)
if(HAVE_CLANG_THREAD_SAFETY)