From f8d5c1b012888466ee4a2d1913216ce662a8ef77 Mon Sep 17 00:00:00 2001 From: Tongliang Liao Date: Wed, 2 Jan 2019 10:38:53 -0800 Subject: [PATCH] Import library for DLL (i.e. rocksdb-shared.lib) requires ARCHIVE DESTINATION. (#4832) Summary: `rocksdb-shared.lib` is missing while `rocksdb.lib` and `rocksdb-shared.dll` are installed correctly. Add `ARCHIVE DESTINATION` to fix this issue. Refer to CMake doc for more details: [ https://cmake.org/cmake/help/v3.13/command/install.html#installing-targets](https://cmake.org/cmake/help/v3.13/command/install.html#installing-targets) > ARCHIVE > Static libraries are treated as ARCHIVE targets, except those marked with the FRAMEWORK property on macOS (see FRAMEWORK below.) For DLL platforms (all Windows-based systems including Cygwin), the DLL import library is treated as an ARCHIVE target. Pull Request resolved: https://github.com/facebook/rocksdb/pull/4832 Differential Revision: D13566301 Pulled By: siying fbshipit-source-id: 56e4ef82f7d5c63bd181ddf23b691336ad77881a --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 314f09e4e..81714bf3c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -823,6 +823,7 @@ if(NOT WIN32 OR ROCKSDB_INSTALL_ON_WINDOWS) TARGETS ${ROCKSDB_SHARED_LIB} EXPORT RocksDBTargets COMPONENT runtime + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"