diff options
Diffstat (limited to 'meta-oe/recipes-dbs/rocksdb/files/0001-Findzstd.cmake-support-pkg-config-based-zstd-detecti.patch')
| -rw-r--r-- | meta-oe/recipes-dbs/rocksdb/files/0001-Findzstd.cmake-support-pkg-config-based-zstd-detecti.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-Findzstd.cmake-support-pkg-config-based-zstd-detecti.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-Findzstd.cmake-support-pkg-config-based-zstd-detecti.patch new file mode 100644 index 0000000000..dac61773e5 --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/0001-Findzstd.cmake-support-pkg-config-based-zstd-detecti.patch | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | From 7509f5d4bfcd8ba8bc0ad8c2054b2b336d8c0c9f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Minjae Kim <mj.kim@mercedes-benz.com> | ||
| 3 | Date: Mon, 9 Feb 2026 20:34:53 +0000 | ||
| 4 | Subject: [PATCH] Findzstd.cmake: support pkg-config based zstd detection | ||
| 5 | |||
| 6 | In Yocto builds, zstd is built via Makefile and does not install | ||
| 7 | CMake package configuration files. As a result, Findzstd.cmake | ||
| 8 | fails to detect ZSTD_INCLUDE_DIRS. | ||
| 9 | |||
| 10 | Add pkg-config based detection as a fallback to properly locate | ||
| 11 | zstd headers and libraries. | ||
| 12 | |||
| 13 | fix error: | ||
| 14 | | Could NOT find zstd (missing: ZSTD_INCLUDE_DIRS) | ||
| 15 | | Call Stack (most recent call first): | ||
| 16 | |||
| 17 | |||
| 18 | Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/14308] | ||
| 19 | |||
| 20 | Signed-off-by: Minjae Kim <flowergom@gmail.com> | ||
| 21 | |||
| 22 | --- | ||
| 23 | cmake/modules/Findzstd.cmake | 4 ++++ | ||
| 24 | 1 file changed, 4 insertions(+) | ||
| 25 | |||
| 26 | diff --git a/cmake/modules/Findzstd.cmake b/cmake/modules/Findzstd.cmake | ||
| 27 | index e82fa148c8..f160be9ae0 100644 | ||
| 28 | --- a/cmake/modules/Findzstd.cmake | ||
| 29 | +++ b/cmake/modules/Findzstd.cmake | ||
| 30 | @@ -14,6 +14,10 @@ find_library(ZSTD_LIBRARIES | ||
| 31 | HINTS ${zstd_ROOT_DIR}/lib) | ||
| 32 | |||
| 33 | include(FindPackageHandleStandardArgs) | ||
| 34 | +find_package(PkgConfig QUIET) | ||
| 35 | +if(PKG_CONFIG_FOUND) | ||
| 36 | + pkg_check_modules(ZSTD QUIET libzstd) | ||
| 37 | +endif() | ||
| 38 | find_package_handle_standard_args(zstd DEFAULT_MSG ZSTD_LIBRARIES ZSTD_INCLUDE_DIRS) | ||
| 39 | |||
| 40 | mark_as_advanced( | ||
| 41 | -- | ||
| 42 | 2.43.0 | ||
| 43 | |||
