aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Use-exported-target-for-bz2.patch
blob: 139312a298c3600d27283a18b0c77f29fd161f97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 46a4e585175cac8d76bd0b64f0fc27c9e22f04a1 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 | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -153,12 +153,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)