blob: 139312a298c3600d27283a18b0c77f29fd161f97 [file] [log] [blame]
Andrew Geisslera2681d92020-10-16 10:17:07 -05001From 46a4e585175cac8d76bd0b64f0fc27c9e22f04a1 Mon Sep 17 00:00:00 2001
2From: Pascal Bach <pascal.bach@nextrem.ch>
3Date: Mon, 12 Oct 2020 21:22:46 +0200
4Subject: [PATCH] cmake: Use exported target for bz2
5
6Without this change, CMake puts the entire path into the generated file.
7This is not portable and makes it fail in environment like Yocto.
8
9Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/7541]
10---
11 CMakeLists.txt | 9 ++-------
12 1 file changed, 2 insertions(+), 7 deletions(-)
13
Andrew Geisslera2681d92020-10-16 10:17:07 -050014--- a/CMakeLists.txt
15+++ b/CMakeLists.txt
Andrew Geissler87f5cff2022-09-30 13:13:31 -050016@@ -153,12 +153,7 @@ else()
Andrew Geisslera2681d92020-10-16 10:17:07 -050017 if(WITH_BZ2)
18 find_package(BZip2 REQUIRED)
19 add_definitions(-DBZIP2)
20- if(BZIP2_INCLUDE_DIRS)
21- include_directories(${BZIP2_INCLUDE_DIRS})
22- else()
23- include_directories(${BZIP2_INCLUDE_DIR})
24- endif()
25- list(APPEND THIRDPARTY_LIBS ${BZIP2_LIBRARIES})
26+ list(APPEND THIRDPARTY_LIBS BZip2::BZip2)
27 endif()
28
29 if(WITH_LZ4)