--- rocksdb-6.12.7/CMakeLists.txt.orig	2020-10-14 20:55:43.000000000 +0300
+++ rocksdb-6.12.7/CMakeLists.txt	2020-10-22 09:04:53.509423000 +0300
@@ -863,7 +863,11 @@
 endif()
 
 if(WIN32)
-  set(SYSTEM_LIBS ${SYSTEM_LIBS} shlwapi.lib rpcrt4.lib)
+  if(MSVC)
+    set(SYSTEM_LIBS ${SYSTEM_LIBS} shlwapi.lib rpcrt4.lib)
+  else()
+    set(SYSTEM_LIBS ${SYSTEM_LIBS} shlwapi rpcrt4)
+  endif()
 else()
   set(SYSTEM_LIBS ${CMAKE_THREAD_LIBS_INIT})
 endif()
@@ -886,13 +890,14 @@
       set_target_properties(${ROCKSDB_SHARED_LIB} PROPERTIES
         COMPILE_FLAGS "/Fd${CMAKE_CFG_INTDIR}/${ROCKSDB_SHARED_LIB}.pdb")
     endif()
-  else()
-    set_target_properties(${ROCKSDB_SHARED_LIB} PROPERTIES
+  endif()
+  set_target_properties(${ROCKSDB_SHARED_LIB} PROPERTIES
                           LINKER_LANGUAGE CXX
                           VERSION ${rocksdb_VERSION}
                           SOVERSION ${rocksdb_VERSION_MAJOR}
-                          OUTPUT_NAME "rocksdb")
-  endif()
+                          OUTPUT_NAME "rocksdb"
+                          RUNTIME_OUTPUT_NAME "rocksdb"
+                          ARCHIVE_OUTPUT_NAME "rocksdb")
 endif()
 
 if(ROCKSDB_BUILD_SHARED AND NOT WIN32)
