Andrew Geissler | a2681d9 | 2020-10-16 10:17:07 -0500 | [diff] [blame] | 1 | From 46a4e585175cac8d76bd0b64f0fc27c9e22f04a1 Mon Sep 17 00:00:00 2001 |
| 2 | From: Pascal Bach <pascal.bach@nextrem.ch> |
| 3 | Date: Mon, 12 Oct 2020 21:22:46 +0200 |
| 4 | Subject: [PATCH] cmake: Use exported target for bz2 |
| 5 | |
| 6 | Without this change, CMake puts the entire path into the generated file. |
| 7 | This is not portable and makes it fail in environment like Yocto. |
| 8 | |
| 9 | Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/7541] |
| 10 | --- |
| 11 | CMakeLists.txt | 9 ++------- |
| 12 | 1 file changed, 2 insertions(+), 7 deletions(-) |
| 13 | |
Andrew Geissler | a2681d9 | 2020-10-16 10:17:07 -0500 | [diff] [blame] | 14 | --- a/CMakeLists.txt |
| 15 | +++ b/CMakeLists.txt |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame^] | 16 | @@ -153,12 +153,7 @@ else() |
Andrew Geissler | a2681d9 | 2020-10-16 10:17:07 -0500 | [diff] [blame] | 17 | 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) |