forked from facebook/rocksdb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: support more compression type
Summary: This pr enables linking all the supported compression libraries via cmake. Closes facebook#2552 Differential Revision: D5620607 Pulled By: yiwu-arbug fbshipit-source-id: b6949181f305bfdf04a98f898c92fd0caba0c45a
- Loading branch information
1 parent
5449c09
commit 185ade4
Showing
5 changed files
with
117 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# - Find Bzip2 | ||
# Find the bzip2 compression library and includes | ||
# | ||
# BZIP2_INCLUDE_DIR - where to find bzlib.h, etc. | ||
# BZIP2_LIBRARIES - List of libraries when using bzip2. | ||
# BZIP2_FOUND - True if bzip2 found. | ||
|
||
find_path(BZIP2_INCLUDE_DIR | ||
NAMES bzlib.h | ||
HINTS ${BZIP2_ROOT_DIR}/include) | ||
|
||
find_library(BZIP2_LIBRARIES | ||
NAMES bz2 | ||
HINTS ${BZIP2_ROOT_DIR}/lib) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(bzip2 DEFAULT_MSG BZIP2_LIBRARIES BZIP2_INCLUDE_DIR) | ||
|
||
mark_as_advanced( | ||
BZIP2_LIBRARIES | ||
BZIP2_INCLUDE_DIR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# - Find Lz4 | ||
# Find the lz4 compression library and includes | ||
# | ||
# LZ4_INCLUDE_DIR - where to find lz4.h, etc. | ||
# LZ4_LIBRARIES - List of libraries when using lz4. | ||
# LZ4_FOUND - True if lz4 found. | ||
|
||
find_path(LZ4_INCLUDE_DIR | ||
NAMES lz4.h | ||
HINTS ${LZ4_ROOT_DIR}/include) | ||
|
||
find_library(LZ4_LIBRARIES | ||
NAMES lz4 | ||
HINTS ${LZ4_ROOT_DIR}/lib) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(lz4 DEFAULT_MSG LZ4_LIBRARIES LZ4_INCLUDE_DIR) | ||
|
||
mark_as_advanced( | ||
LZ4_LIBRARIES | ||
LZ4_INCLUDE_DIR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# - Find zlib | ||
# Find the zlib compression library and includes | ||
# | ||
# ZLIB_INCLUDE_DIR - where to find zlib.h, etc. | ||
# ZLIB_LIBRARIES - List of libraries when using zlib. | ||
# ZLIB_FOUND - True if zlib found. | ||
|
||
find_path(ZLIB_INCLUDE_DIR | ||
NAMES zlib.h | ||
HINTS ${ZLIB_ROOT_DIR}/include) | ||
|
||
find_library(ZLIB_LIBRARIES | ||
NAMES z | ||
HINTS ${ZLIB_ROOT_DIR}/lib) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(zlib DEFAULT_MSG ZLIB_LIBRARIES ZLIB_INCLUDE_DIR) | ||
|
||
mark_as_advanced( | ||
ZLIB_LIBRARIES | ||
ZLIB_INCLUDE_DIR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# - Find zstd | ||
# Find the zstd compression library and includes | ||
# | ||
# ZSTD_INCLUDE_DIR - where to find zstd.h, etc. | ||
# ZSTD_LIBRARIES - List of libraries when using zstd. | ||
# ZSTD_FOUND - True if zstd found. | ||
|
||
find_path(ZSTD_INCLUDE_DIR | ||
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_DIR) | ||
|
||
mark_as_advanced( | ||
ZSTD_LIBRARIES | ||
ZSTD_INCLUDE_DIR) |