diff options
Diffstat (limited to 'meta-oe/recipes-support/cpprest/cpprest/system-brotli.patch')
-rw-r--r-- | meta-oe/recipes-support/cpprest/cpprest/system-brotli.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/cpprest/cpprest/system-brotli.patch b/meta-oe/recipes-support/cpprest/cpprest/system-brotli.patch new file mode 100644 index 000000000..e6f64772d --- /dev/null +++ b/meta-oe/recipes-support/cpprest/cpprest/system-brotli.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | Description: Find system brotli | ||
2 | Author: Gianfranco Costamagna <locutusofborg@debian.org> | ||
3 | Forwarded: https://github.com/Microsoft/cpprestsdk/pull/952 | ||
4 | Last-Update: 2018-11-05 | ||
5 | |||
6 | --- cpprest-2.10.7.orig/Release/cmake/cpprest_find_brotli.cmake | ||
7 | +++ cpprest-2.10.7/Release/cmake/cpprest_find_brotli.cmake | ||
8 | @@ -3,8 +3,17 @@ function(cpprest_find_brotli) | ||
9 | return() | ||
10 | endif() | ||
11 | |||
12 | - find_package(unofficial-brotli REQUIRED) | ||
13 | |||
14 | - add_library(cpprestsdk_brotli_internal INTERFACE) | ||
15 | - target_link_libraries(cpprestsdk_brotli_internal INTERFACE unofficial::brotli::brotlienc unofficial::brotli::brotlidec unofficial::brotli::brotlicommon) | ||
16 | + find_package(PkgConfig) | ||
17 | + pkg_check_modules(BROTLIENC libbrotlienc) | ||
18 | + pkg_check_modules(BROTLIDEC libbrotlidec) | ||
19 | + if(BROTLIDEC_FOUND AND BROTLIENC_FOUND) | ||
20 | + target_link_libraries(cpprest PRIVATE ${BROTLIDEC_LDFLAGS} ${BROTLIENC_LDFLAGS}) | ||
21 | + else(BROTLIDEC_FOUND AND BROTLIENC_FOUND) | ||
22 | + find_package(unofficial-brotli REQUIRED) | ||
23 | + add_library(cpprestsdk_brotli_internal INTERFACE) | ||
24 | + target_link_libraries(cpprestsdk_brotli_internal INTERFACE unofficial::brotli::brotlienc unofficial::brotli::brotlidec unofficial::brotli::brotlicommon) | ||
25 | + target_link_libraries(cpprest PRIVATE cpprestsdk_brotli_internal) | ||
26 | + endif(BROTLIDEC_FOUND AND BROTLIENC_FOUND) | ||
27 | + | ||
28 | endfunction() | ||
29 | --- cpprest-2.10.7.orig/Release/src/CMakeLists.txt | ||
30 | +++ cpprest-2.10.7/Release/src/CMakeLists.txt | ||
31 | @@ -84,7 +84,6 @@ else() | ||
32 | target_compile_definitions(cpprest PRIVATE -DCPPREST_EXCLUDE_BROTLI=1) | ||
33 | else() | ||
34 | cpprest_find_brotli() | ||
35 | - target_link_libraries(cpprest PRIVATE cpprestsdk_brotli_internal) | ||
36 | endif() | ||
37 | endif() | ||
38 | |||