File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,17 @@ function(cpprest_find_brotli)
3
3
return ()
4
4
endif ()
5
5
6
- find_package (unofficial-brotli REQUIRED )
7
6
8
- add_library (cpprestsdk_brotli_internal INTERFACE )
9
- target_link_libraries (cpprestsdk_brotli_internal INTERFACE unofficial::brotli::brotlienc unofficial::brotli::brotlidec unofficial::brotli::brotlicommon )
7
+ find_package (PkgConfig )
8
+ pkg_check_modules (BROTLIENC libbrotlienc )
9
+ pkg_check_modules (BROTLIDEC libbrotlidec )
10
+ if (BROTLIDEC_FOUND AND BROTLIENC_FOUND )
11
+ target_link_libraries (cpprest PRIVATE ${BROTLIDEC_LDFLAGS} ${BROTLIENC_LDFLAGS} )
12
+ else (BROTLIDEC_FOUND AND BROTLIENC_FOUND )
13
+ find_package (unofficial-brotli REQUIRED )
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
+ target_link_libraries (cpprest PRIVATE cpprestsdk_brotli_internal )
17
+ endif (BROTLIDEC_FOUND AND BROTLIENC_FOUND )
18
+
10
19
endfunction ()
Original file line number Diff line number Diff line change 84
84
target_compile_definitions (cpprest PRIVATE -DCPPREST_EXCLUDE_BROTLI=1 )
85
85
else ()
86
86
cpprest_find_brotli ()
87
- target_link_libraries (cpprest PRIVATE cpprestsdk_brotli_internal )
88
87
endif ()
89
88
endif ()
90
89
You can’t perform that action at this time.
0 commit comments