vcpkg/ports/rocksdb/0005-static-linking-in-linux.patch
Hongxu Xu 68759e0dfe [rocksdb] Supported static linking in Linux ()
* [rocksdb] Supported static linking in Linux

* Updated rocksdb CONTROL version
2019-04-19 17:05:36 -07:00

19 lines
672 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0303186..2b09591 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -741,7 +741,12 @@ if(WIN32)
set(LIBS ${ROCKSDB_STATIC_LIB} ${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
else()
set(SYSTEM_LIBS ${CMAKE_THREAD_LIBS_INIT})
- set(LIBS ${ROCKSDB_SHARED_LIB} ${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
+
+ if(ROCKSDB_DISABLE_INSTALL_SHARED_LIB)
+ set(LIBS ${ROCKSDB_STATIC_LIB} ${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
+ else()
+ set(LIBS ${ROCKSDB_SHARED_LIB} ${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
+ endif()
add_library(${ROCKSDB_SHARED_LIB} SHARED ${SOURCES})
target_link_libraries(${ROCKSDB_SHARED_LIB}