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 | --- |
| 9 | cmake/FindLZ4.cmake | 9 +++++++-- |
| 10 | 1 file changed, 7 insertions(+), 2 deletions(-) |
| 11 | |
| 12 | diff --git a/cmake/FindLZ4.cmake b/cmake/FindLZ4.cmake |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 13 | index eebd859..094241c 100644 |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 14 | --- a/cmake/FindLZ4.cmake |
| 15 | +++ b/cmake/FindLZ4.cmake |
| 16 | @@ -1,5 +1,10 @@ |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 17 | -find_path(LZ4_INCLUDE_DIRS NAMES lz4.h) |
Andrew Geissler | bbbd5f4 | 2020-10-30 15:42:48 -0500 | [diff] [blame] | 18 | -find_library(LZ4_LIBRARIES NAMES lz4) |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 19 | +find_path(LZ4_INCLUDE_DIR |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 20 | + NAMES lz4.h |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 21 | + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) |
| 22 | + |
Andrew Geissler | bbbd5f4 | 2020-10-30 15:42:48 -0500 | [diff] [blame] | 23 | +find_library(LZ4_LIBRARIES |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 24 | + NAMES lz4 |
| 25 | + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) |
| 26 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 27 | 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 Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 29 | -- |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 30 | 2.25.1 |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 31 | |