mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-30 04:41:49 +00:00
cc9fa7fcdb
Summary: - cmake: use the builtin FindBzip2.cmake from CMake - cmake: require CMake v3.5.1 - cmake: add imported target for 3rd party libraries - cmake: extract ReadVersion.cmake out and refactor it Pull Request resolved: https://github.com/facebook/rocksdb/pull/5662 Differential Revision: D16660974 Pulled By: maysamyabandeh fbshipit-source-id: 681594910e74253251fe14ad0befc41a4d0f4fd4
30 lines
781 B
CMake
30 lines
781 B
CMake
# - Find zstd
|
|
# Find the zstd compression library and includes
|
|
#
|
|
# zstd_INCLUDE_DIRS - where to find zstd.h, etc.
|
|
# zstd_LIBRARIES - List of libraries when using zstd.
|
|
# zstd_FOUND - True if zstd found.
|
|
|
|
find_path(zstd_INCLUDE_DIRS
|
|
NAMES zstd.h
|
|
HINTS ${zstd_ROOT_DIR}/include)
|
|
|
|
find_library(zstd_LIBRARIES
|
|
NAMES zstd
|
|
HINTS ${zstd_ROOT_DIR}/lib)
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
find_package_handle_standard_args(zstd DEFAULT_MSG zstd_LIBRARIES zstd_INCLUDE_DIRS)
|
|
|
|
mark_as_advanced(
|
|
zstd_LIBRARIES
|
|
zstd_INCLUDE_DIRS)
|
|
|
|
if(zstd_FOUND AND NOT (TARGET zstd::zstd))
|
|
add_library (zstd::zstd UNKNOWN IMPORTED)
|
|
set_target_properties(zstd::zstd
|
|
PROPERTIES
|
|
IMPORTED_LOCATION ${zstd_LIBRARIES}
|
|
INTERFACE_INCLUDE_DIRECTORIES ${zstd_INCLUDE_DIRS})
|
|
endif()
|