Commit 5da07f20 authored by syncad's avatar syncad

Branch 'hive_issue_23_fix' rebased onto master

parents bb795e1f a659c3c8
# for each subdirectory containing a CMakeLists.txt, add that subdirectory
set(BUILD_SHARED_LIBS OFF)
set(ROCKSDB_STATIC ${HIVE_STATIC_BUILD})
#Configure needed build options of RocksDB.
SET(WITH_TESTS OFF CACHE BOOL "build with tests")
......
......@@ -85,10 +85,18 @@ else()
endif()
if(WITH_SNAPPY)
find_package(snappy REQUIRED)
add_definitions(-DSNAPPY)
include_directories(${SNAPPY_INCLUDE_DIR})
list(APPEND THIRDPARTY_LIBS ${SNAPPY_LIBRARIES})
find_package(snappy REQUIRED)
add_definitions(-DSNAPPY)
include_directories(${SNAPPY_INCLUDE_DIR})
if(ROCKSDB_STATIC)
set (LIBRARY_SUFFIX CMAKE_IMPORT_LIBRARY_SUFFIX)
set (CMAKE_FIND_LIBRARY_SUFFIXES .a)
find_library(STATIC_SNAPPY snappy REQUIRED)
list(APPEND THIRDPARTY_LIBS ${STATIC_SNAPPY})
set (CMAKE_FIND_LIBRARY_SUFFIXES ${LIBRARY_SUFFIX})
else()
list(APPEND THIRDPARTY_LIBS ${SNAPPY_LIBRARIES})
endif()
endif()
if(WITH_ZLIB)
......@@ -743,6 +751,7 @@ else()
target_link_libraries(${ROCKSDB_SHARED_LIB}
${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
set_target_properties(${ROCKSDB_SHARED_LIB} PROPERTIES
EXCLUDE_FROM_ALL 1
LINKER_LANGUAGE CXX
VERSION ${ROCKSDB_VERSION}
SOVERSION ${ROCKSDB_VERSION_MAJOR}
......@@ -818,6 +827,7 @@ if(NOT WIN32 OR ROCKSDB_INSTALL_ON_WINDOWS)
TARGETS ${ROCKSDB_SHARED_LIB}
EXPORT RocksDBTargets
COMPONENT runtime
EXCLUDE_FROM_ALL
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
......
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