Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1 | From f15fbdf1244ca9ce01c5507660a86d685ed88bcf Mon Sep 17 00:00:00 2001 |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 2 | From: Sumit Garg <sumit.garg@linaro.org> |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3 | Date: Mon, 21 Mar 2022 15:08:40 +0800 |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 4 | Subject: [PATCH] Fix library LZ4 lookup. |
| 5 | |
| 6 | Signed-off-by: Sumit Garg <sumit.garg@linaro.org> |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 7 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 8 | --- |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 9 | Upstream-Status: Pending |
| 10 | |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 11 | cmake/FindLZ4.cmake | 9 +++++++-- |
| 12 | 1 file changed, 7 insertions(+), 2 deletions(-) |
| 13 | |
| 14 | diff --git a/cmake/FindLZ4.cmake b/cmake/FindLZ4.cmake |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 15 | index eebd859..094241c 100644 |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 16 | --- a/cmake/FindLZ4.cmake |
| 17 | +++ b/cmake/FindLZ4.cmake |
| 18 | @@ -1,5 +1,10 @@ |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 19 | -find_path(LZ4_INCLUDE_DIRS NAMES lz4.h) |
Andrew Geissler | bbbd5f4 | 2020-10-30 15:42:48 -0500 | [diff] [blame] | 20 | -find_library(LZ4_LIBRARIES NAMES lz4) |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 21 | +find_path(LZ4_INCLUDE_DIR |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 22 | + NAMES lz4.h |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 23 | + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) |
| 24 | + |
Andrew Geissler | bbbd5f4 | 2020-10-30 15:42:48 -0500 | [diff] [blame] | 25 | +find_library(LZ4_LIBRARIES |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 26 | + NAMES lz4 |
| 27 | + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) |
| 28 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 29 | 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 Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 31 | -- |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 32 | 2.25.1 |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 33 | |