mariadb/cmake/FindZSTD.cmake
Vladislav Vaintroub de49fd842a RocksDB : Add lookup / compiling with optional compression libraries.
This change add WITH_ROCKSDB_{LZ4,BZIP2,ZSTD,snappy} CMake variables
that can be set to ON/OFF/AUTO.

If variable has default value AUTO, rocksdb links with corresponding
compression library. OFF disables compiling/linking with specific compression
library, ON forces compiling with it (cmake would throw error if library
is not available)

Support for ZLIB is added unconditionally, as it is always there.
2017-02-09 16:55:02 +00:00

18 lines
331 B
CMake

find_path(
ZSTD_INCLUDE_DIR
NAMES "zstd.h"
)
find_library(
ZSTD_LIBRARY
NAMES zstd
)
set(ZSTD_LIBRARIES ${ZSTD_LIBRARY})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
ZSTD DEFAULT_MSG ZSTD_INCLUDE_DIR ZSTD_LIBRARIES)
mark_as_advanced(ZSTD_INCLUDE_DIR ZSTD_LIBRARIES ZSTD_FOUND)