]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: add check for liblz4
authorKefu Chai <kchai@redhat.com>
Wed, 6 Jan 2016 11:35:30 +0000 (19:35 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 7 Jan 2016 11:59:36 +0000 (03:59 -0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
cmake/modules/FindLZ4.cmake [new file with mode: 0644]

diff --git a/cmake/modules/FindLZ4.cmake b/cmake/modules/FindLZ4.cmake
new file mode 100644 (file)
index 0000000..5625865
--- /dev/null
@@ -0,0 +1,15 @@
+# Try to find liblz4
+#
+# Once done, this will define
+#
+# LZ4_FOUND
+# LZ4_INCLUDE_DIR
+# LZ4_LIBRARY
+
+find_path(LZ4_INCLUDE_DIR NAMES lz4.h)
+find_library(LZ4_LIBRARY NAMES lz4)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(LZ4 DEFAULT_MSG LZ4_LIBRARY LZ4_INCLUDE_DIR)
+
+mark_as_advanced(LZ4_INCLUDE_DIR LZ4_LIBRARY)