]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/rocksdb/0003-use-find-package.patch
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / ports / rocksdb / 0003-use-find-package.patch
1 diff --git a/CMakeLists.txt b/CMakeLists.txt
2 index 6761929..6f74d31 100644
3 --- a/CMakeLists.txt
4 +++ b/CMakeLists.txt
5 @@ -91,7 +91,7 @@ include(CMakeDependentOption)
6 CMAKE_DEPENDENT_OPTION(WITH_GFLAGS "build with GFlags" ON
7 "NOT MSVC;NOT MINGW" OFF)
8
9 -if(MSVC)
10 +if(MSVC AND NOT VCPKG_TOOLCHAIN)
11 option(WITH_XPRESS "build with windows built in compression" OFF)
12 include(${CMAKE_CURRENT_SOURCE_DIR}/thirdparty.inc)
13 else()
14 @@ -130,10 +130,7 @@ else()
15 endif()
16
17 if(WITH_SNAPPY)
18 - find_package(Snappy CONFIG)
19 - if(NOT Snappy_FOUND)
20 - find_package(Snappy REQUIRED)
21 - endif()
22 + find_package(Snappy CONFIG REQUIRED)
23 add_definitions(-DSNAPPY)
24 list(APPEND THIRDPARTY_LIBS Snappy::snappy)
25 endif()
26 @@ -157,16 +154,19 @@ else()
27 endif()
28
29 if(WITH_LZ4)
30 - find_package(lz4 REQUIRED)
31 + find_package(lz4 CONFIG REQUIRED)
32 add_definitions(-DLZ4)
33 list(APPEND THIRDPARTY_LIBS lz4::lz4)
34 endif()
35
36 if(WITH_ZSTD)
37 - find_package(zstd REQUIRED)
38 + find_package(zstd CONFIG REQUIRED)
39 add_definitions(-DZSTD)
40 - include_directories(${ZSTD_INCLUDE_DIR})
41 - list(APPEND THIRDPARTY_LIBS zstd::zstd)
42 + if(TARGET zstd::libzstd_shared)
43 + list(APPEND THIRDPARTY_LIBS zstd::libzstd_shared)
44 + elseif(TARGET zstd::libzstd_static)
45 + list(APPEND THIRDPARTY_LIBS zstd::libzstd_static)
46 + endif()
47 endif()
48 endif()
49
50 @@ -375,9 +375,9 @@ endif()
51
52 option(WITH_TBB "build with Threading Building Blocks (TBB)" OFF)
53 if(WITH_TBB)
54 - find_package(TBB REQUIRED)
55 + find_package(TBB CONFIG REQUIRED)
56 add_definitions(-DTBB)
57 - list(APPEND THIRDPARTY_LIBS TBB::TBB)
58 + list(APPEND THIRDPARTY_LIBS TBB::tbb)
59 endif()
60
61 # Stall notifications eat some performance from inserts