blob: 6d9352fe8623ebbec9ee360a59db793a5c3a3a19 [file] [log] [blame]
Andrew Geissler9aee5002022-03-30 16:27:02 +00001From f15fbdf1244ca9ce01c5507660a86d685ed88bcf Mon Sep 17 00:00:00 2001
Brad Bishope42b3e32020-01-15 22:08:42 -05002From: Sumit Garg <sumit.garg@linaro.org>
Andrew Geissler9aee5002022-03-30 16:27:02 +00003Date: Mon, 21 Mar 2022 15:08:40 +0800
Brad Bishope42b3e32020-01-15 22:08:42 -05004Subject: [PATCH] Fix library LZ4 lookup.
5
6Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Andrew Geissler9aee5002022-03-30 16:27:02 +00007Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Brad Bishope42b3e32020-01-15 22:08:42 -05008---
9 cmake/FindLZ4.cmake | 9 +++++++--
10 1 file changed, 7 insertions(+), 2 deletions(-)
11
12diff --git a/cmake/FindLZ4.cmake b/cmake/FindLZ4.cmake
Andrew Geissler9aee5002022-03-30 16:27:02 +000013index eebd859..094241c 100644
Brad Bishope42b3e32020-01-15 22:08:42 -050014--- a/cmake/FindLZ4.cmake
15+++ b/cmake/FindLZ4.cmake
16@@ -1,5 +1,10 @@
Andrew Geissler9aee5002022-03-30 16:27:02 +000017-find_path(LZ4_INCLUDE_DIRS NAMES lz4.h)
Andrew Geisslerbbbd5f42020-10-30 15:42:48 -050018-find_library(LZ4_LIBRARIES NAMES lz4)
Brad Bishope42b3e32020-01-15 22:08:42 -050019+find_path(LZ4_INCLUDE_DIR
Andrew Geissler9aee5002022-03-30 16:27:02 +000020+ NAMES lz4.h
Brad Bishope42b3e32020-01-15 22:08:42 -050021+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
22+
Andrew Geisslerbbbd5f42020-10-30 15:42:48 -050023+find_library(LZ4_LIBRARIES
Brad Bishope42b3e32020-01-15 22:08:42 -050024+ NAMES lz4
25+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
26
Andrew Geissler9aee5002022-03-30 16:27:02 +000027 if(LZ4_INCLUDE_DIRS AND EXISTS "${LZ4_INCLUDE_DIRS}/lz4.h")
28 file(STRINGS "${LZ4_INCLUDE_DIRS}/lz4.h" LZ4_H REGEX "^#define LZ4_VERSION_[MR]")
Brad Bishope42b3e32020-01-15 22:08:42 -050029--
Andrew Geissler9aee5002022-03-30 16:27:02 +0000302.25.1
Brad Bishope42b3e32020-01-15 22:08:42 -050031