]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/woff2/0001-unofficial-brotli.patch
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / ports / woff2 / 0001-unofficial-brotli.patch
1 diff --git a/CMakeLists.txt b/CMakeLists.txt
2 index ecfbb83..7fb7a15 100644
3 --- a/CMakeLists.txt
4 +++ b/CMakeLists.txt
5 @@ -34,13 +34,23 @@ endif()
6 # Find Brotli dependencies
7 set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
8 find_package(BrotliDec)
9 -if (NOT BROTLIDEC_FOUND)
10 - message(FATAL_ERROR "librotlidec is needed to build woff2.")
11 -endif ()
12 find_package(BrotliEnc)
13 -if (NOT BROTLIENC_FOUND)
14 - message(FATAL_ERROR "librotlienc is needed to build woff2.")
15 -endif ()
16 +if(BROTLIDEC_FOUND AND BROTLIENC_FOUND)
17 + include_directories("${BROTLIDEC_INCLUDE_DIRS}" "${BROTLIENC_INCLUDE_DIRS}")
18 + set(WOFF2_BROTLIDEC libbrotlidec)
19 + set(WOFF2_BROTLIENC libbrotlienc)
20 + set(WOFF2_BORTLIDEC_LIBRARIES "${BROTLIDEC_LIBRARIES}")
21 + set(WOFF2_BORTLIENC_LIBRARIES "${BROTLIENC_LIBRARIES}")
22 +else()
23 + find_package(unofficial-brotli REQUIRED)
24 + if(TARGET unofficial::brotli::brotlidec-static)
25 + set(BROTLI_LINKAGE -static)
26 + endif()
27 + set(WOFF2_BROTLIDEC unofficial::brotli::brotlidec${BROTLI_LINKAGE})
28 + set(WOFF2_BROTLIENC unofficial::brotli::brotlienc${BROTLI_LINKAGE})
29 + set(WOFF2_BORTLIDEC_LIBRARIES unofficial::brotli::brotlidec${BROTLI_LINKAGE} unofficial::brotli::brotlicommon${BROTLI_LINKAGE})
30 + set(WOFF2_BORTLIENC_LIBRARIES unofficial::brotli::brotlienc${BROTLI_LINKAGE} unofficial::brotli::brotlicommon${BROTLI_LINKAGE})
31 +endif()
32
33 # Set compiler flags
34 if (NOT CANONICAL_PREFIXES)
35 @@ -63,9 +73,8 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMMON_FLAG}")
36 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMMON_FLAG}")
37 set(CMAKE_CXX_STANDARD 11)
38
39 -# Set search path for our private/public headers as well as Brotli headers
40 -include_directories("src" "include"
41 - "${BROTLIDEC_INCLUDE_DIRS}" "${BROTLIENC_INCLUDE_DIRS}")
42 +# Set search path for our private/public headers
43 +include_directories("src" "include")
44
45 # Common part used by decoder and encoder
46 add_library(woff2common
47 @@ -77,7 +86,7 @@ add_library(woff2common
48 add_library(woff2dec
49 src/woff2_dec.cc
50 src/woff2_out.cc)
51 -target_link_libraries(woff2dec woff2common "${BROTLIDEC_LIBRARIES}")
52 +target_link_libraries(woff2dec woff2common ${WOFF2_BORTLIDEC_LIBRARIES})
53 add_executable(woff2_decompress src/woff2_decompress.cc)
54 target_link_libraries(woff2_decompress woff2dec)
55
56 @@ -88,7 +97,7 @@ add_library(woff2enc
57 src/normalize.cc
58 src/transform.cc
59 src/woff2_enc.cc)
60 -target_link_libraries(woff2enc woff2common "${BROTLIENC_LIBRARIES}")
61 +target_link_libraries(woff2enc woff2common ${WOFF2_BORTLIENC_LIBRARIES})
62 add_executable(woff2_compress src/woff2_compress.cc)
63 target_link_libraries(woff2_compress woff2enc)
64
65 @@ -246,7 +255,7 @@ generate_pkg_config ("${CMAKE_CURRENT_BINARY_DIR}/libwoff2dec.pc"
66 DESCRIPTION "WOFF2 decoder library"
67 URL "https://github.com/google/woff2"
68 VERSION "${WOFF2_VERSION}"
69 - DEPENDS libbrotlidec
70 + DEPENDS ${WOFF2_BROTLIDEC}
71 DEPENDS_PRIVATE libwoff2common
72 LIBRARIES woff2dec)
73
74 @@ -255,7 +264,7 @@ generate_pkg_config ("${CMAKE_CURRENT_BINARY_DIR}/libwoff2enc.pc"
75 DESCRIPTION "WOFF2 encoder library"
76 URL "https://github.com/google/woff2"
77 VERSION "${WOFF2_VERSION}"
78 - DEPENDS libbrotlienc
79 + DEPENDS ${WOFF2_BROTLIENC}
80 DEPENDS_PRIVATE libwoff2common
81 LIBRARIES woff2enc)
82
83 @@ -264,6 +273,7 @@ if (NOT BUILD_SHARED_LIBS)
84 install(
85 TARGETS woff2_decompress woff2_compress woff2_info
86 RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
87 + BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}"
88 )
89 endif()
90