summaryrefslogtreecommitdiffstats
path: root/src/compressor/CMakeLists.txt
diff options
context:
space:
mode:
authorHaomai Wang <haomai@xsky.com>2017-06-02 09:00:11 +0200
committerHaomai Wang <haomai@xsky.com>2017-06-03 09:56:05 +0200
commita97a6e8274b0c02659de46981e74baca32520db9 (patch)
treeb769894da43194e66133f88f9e1703f3cda022b8 /src/compressor/CMakeLists.txt
parentMerge pull request #15420 from yuriw/wip_remove_default_idle_timeout (diff)
downloadceph-a97a6e8274b0c02659de46981e74baca32520db9.tar.xz
ceph-a97a6e8274b0c02659de46981e74baca32520db9.zip
compressor: add LZ4 support
Signed-off-by: Haomai Wang <haomai@xsky.com>
Diffstat (limited to 'src/compressor/CMakeLists.txt')
-rw-r--r--src/compressor/CMakeLists.txt23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/compressor/CMakeLists.txt b/src/compressor/CMakeLists.txt
index c4d3b82c91d..8e0e61cdb91 100644
--- a/src/compressor/CMakeLists.txt
+++ b/src/compressor/CMakeLists.txt
@@ -12,14 +12,33 @@ add_subdirectory(snappy)
add_subdirectory(zlib)
add_subdirectory(zstd)
-add_custom_target(compressor_plugins DEPENDS
+if (HAVE_LZ4)
+ add_subdirectory(lz4)
+endif()
+
+set(ceph_compressor_libs
ceph_snappy
ceph_zlib
ceph_zstd)
+if (HAVE_LZ4)
+ list(APPEND ceph_compressor_libs ceph_lz4)
+endif()
+
+add_custom_target(compressor_plugins DEPENDS
+ ${ceph_compressor_libs})
+
if(WITH_EMBEDDED)
include(MergeStaticLibraries)
add_library(cephd_compressor_base STATIC ${compressor_srcs})
set_target_properties(cephd_compressor_base PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED)
- merge_static_libraries(cephd_compressor cephd_compressor_base cephd_compressor_snappy cephd_compressor_zlib cephd_compressor_zstd)
+ set(cephd_compressor_libs
+ cephd_compressor_base
+ cephd_compressor_snappy
+ cephd_compressor_zlib
+ cephd_compressor_zstd)
+ if (HAVE_LZ4)
+ list(APPEND cephd_compressor_libs cephd_compressor_lz4)
+ endif()
+ merge_static_libraries(cephd_compressor ${cephd_compressor_libs})
endif()