blob: d8671b76b0bffc162802bc426fbdb09c1fd4e68b [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---
Patrick Williams520786c2023-06-25 16:20:36 -05009Upstream-Status: Pending
10
Brad Bishope42b3e32020-01-15 22:08:42 -050011 cmake/FindLZ4.cmake | 9 +++++++--
12 1 file changed, 7 insertions(+), 2 deletions(-)
13
14diff --git a/cmake/FindLZ4.cmake b/cmake/FindLZ4.cmake
Andrew Geissler9aee5002022-03-30 16:27:02 +000015index eebd859..094241c 100644
Brad Bishope42b3e32020-01-15 22:08:42 -050016--- a/cmake/FindLZ4.cmake
17+++ b/cmake/FindLZ4.cmake
18@@ -1,5 +1,10 @@
Andrew Geissler9aee5002022-03-30 16:27:02 +000019-find_path(LZ4_INCLUDE_DIRS NAMES lz4.h)
Andrew Geisslerbbbd5f42020-10-30 15:42:48 -050020-find_library(LZ4_LIBRARIES NAMES lz4)
Brad Bishope42b3e32020-01-15 22:08:42 -050021+find_path(LZ4_INCLUDE_DIR
Andrew Geissler9aee5002022-03-30 16:27:02 +000022+ NAMES lz4.h
Brad Bishope42b3e32020-01-15 22:08:42 -050023+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
24+
Andrew Geisslerbbbd5f42020-10-30 15:42:48 -050025+find_library(LZ4_LIBRARIES
Brad Bishope42b3e32020-01-15 22:08:42 -050026+ NAMES lz4
27+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
28
Andrew Geissler9aee5002022-03-30 16:27:02 +000029 if(LZ4_INCLUDE_DIRS AND EXISTS "${LZ4_INCLUDE_DIRS}/lz4.h")
30 file(STRINGS "${LZ4_INCLUDE_DIRS}/lz4.h" LZ4_H REGEX "^#define LZ4_VERSION_[MR]")
Brad Bishope42b3e32020-01-15 22:08:42 -050031--
Andrew Geissler9aee5002022-03-30 16:27:02 +0000322.25.1
Brad Bishope42b3e32020-01-15 22:08:42 -050033