Commit a659c3c8 authored by Filip Kaczmarek's avatar Filip Kaczmarek

Added variable to store original library suffix from CMAKE_IMPORT_LIBRARY_SUFFIX

parent 40e26e04
...@@ -89,10 +89,11 @@ else() ...@@ -89,10 +89,11 @@ else()
add_definitions(-DSNAPPY) add_definitions(-DSNAPPY)
include_directories(${SNAPPY_INCLUDE_DIR}) include_directories(${SNAPPY_INCLUDE_DIR})
if(ROCKSDB_STATIC) if(ROCKSDB_STATIC)
set (LIBRARY_SUFFIX CMAKE_IMPORT_LIBRARY_SUFFIX)
set (CMAKE_FIND_LIBRARY_SUFFIXES .a) set (CMAKE_FIND_LIBRARY_SUFFIXES .a)
find_library(STATIC_SNAPPY snappy REQUIRED) find_library(STATIC_SNAPPY snappy REQUIRED)
list(APPEND THIRDPARTY_LIBS ${STATIC_SNAPPY}) list(APPEND THIRDPARTY_LIBS ${STATIC_SNAPPY})
set (CMAKE_FIND_LIBRARY_SUFFIXES .so .a) set (CMAKE_FIND_LIBRARY_SUFFIXES ${LIBRARY_SUFFIX})
else() else()
list(APPEND THIRDPARTY_LIBS ${SNAPPY_LIBRARIES}) list(APPEND THIRDPARTY_LIBS ${SNAPPY_LIBRARIES})
endif() endif()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment