aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-dbs/rocksdb/files/0002-cmake-Use-exported-target-for-bz2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-dbs/rocksdb/files/0002-cmake-Use-exported-target-for-bz2.patch')
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/0002-cmake-Use-exported-target-for-bz2.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0002-cmake-Use-exported-target-for-bz2.patch b/meta-oe/recipes-dbs/rocksdb/files/0002-cmake-Use-exported-target-for-bz2.patch
new file mode 100644
index 0000000000..6b46a1f300
--- /dev/null
+++ b/meta-oe/recipes-dbs/rocksdb/files/0002-cmake-Use-exported-target-for-bz2.patch
@@ -0,0 +1,34 @@
+From bb3fc86f87a9acc64628e1cb32f5c8a1cfbeb880 Mon Sep 17 00:00:00 2001
+From: Pascal Bach <pascal.bach@nextrem.ch>
+Date: Mon, 12 Oct 2020 21:22:46 +0200
+Subject: [PATCH] cmake: Use exported target for bz2
+
+Without this change, CMake puts the entire path into the generated file.
+This is not portable and makes it fail in environment like Yocto.
+
+Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/7541]
+---
+ CMakeLists.txt | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0a7f820a22..be80edb955 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -149,12 +149,7 @@ else()
+ if(WITH_BZ2)
+ find_package(BZip2 REQUIRED)
+ add_definitions(-DBZIP2)
+- if(BZIP2_INCLUDE_DIRS)
+- include_directories(${BZIP2_INCLUDE_DIRS})
+- else()
+- include_directories(${BZIP2_INCLUDE_DIR})
+- endif()
+- list(APPEND THIRDPARTY_LIBS ${BZIP2_LIBRARIES})
++ list(APPEND THIRDPARTY_LIBS BZip2::BZip2)
+ endif()
+
+ if(WITH_LZ4)
+--
+2.25.1
+