summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-dbs/rocksdb/files/0001-Findzstd.cmake-support-pkg-config-based-zstd-detecti.patch
diff options
context:
space:
mode:
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.patch43
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 @@
1From 7509f5d4bfcd8ba8bc0ad8c2054b2b336d8c0c9f Mon Sep 17 00:00:00 2001
2From: Minjae Kim <mj.kim@mercedes-benz.com>
3Date: Mon, 9 Feb 2026 20:34:53 +0000
4Subject: [PATCH] Findzstd.cmake: support pkg-config based zstd detection
5
6In Yocto builds, zstd is built via Makefile and does not install
7CMake package configuration files. As a result, Findzstd.cmake
8fails to detect ZSTD_INCLUDE_DIRS.
9
10Add pkg-config based detection as a fallback to properly locate
11zstd headers and libraries.
12
13fix error:
14| Could NOT find zstd (missing: ZSTD_INCLUDE_DIRS)
15| Call Stack (most recent call first):
16
17
18Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/14308]
19
20Signed-off-by: Minjae Kim <flowergom@gmail.com>
21
22---
23 cmake/modules/Findzstd.cmake | 4 ++++
24 1 file changed, 4 insertions(+)
25
26diff --git a/cmake/modules/Findzstd.cmake b/cmake/modules/Findzstd.cmake
27index 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--
422.43.0
43