diff --git a/src/native/libs/System.IO.Compression.Native/CMakeLists.txt b/src/native/libs/System.IO.Compression.Native/CMakeLists.txt index 0734e8a3112b6..2f8b16276783f 100644 --- a/src/native/libs/System.IO.Compression.Native/CMakeLists.txt +++ b/src/native/libs/System.IO.Compression.Native/CMakeLists.txt @@ -7,6 +7,10 @@ if (NOT CLR_CMAKE_USE_SYSTEM_ZLIB) endif() if (CLR_CMAKE_USE_SYSTEM_BROTLI) + find_library(BROTLIDEC brotlidec REQUIRED) + find_library(BROTLIENC brotlienc REQUIRED) + list(APPEND ${BROTLI_LIBRARIES} ${BROTLIDEC} ${BROTLIENC}) + if (CLR_CMAKE_HOST_FREEBSD) set(CMAKE_REQUIRED_INCLUDES ${CROSS_ROOTFS}/usr/local/include) endif() diff --git a/src/native/libs/System.IO.Compression.Native/extra_libs.cmake b/src/native/libs/System.IO.Compression.Native/extra_libs.cmake index f10684f561bf7..03b40533e2109 100644 --- a/src/native/libs/System.IO.Compression.Native/extra_libs.cmake +++ b/src/native/libs/System.IO.Compression.Native/extra_libs.cmake @@ -19,4 +19,11 @@ macro(append_extra_compression_libs NativeLibsExtra) list(APPEND ZLIB_LIBRARIES $,z,zlib>) endif () list(APPEND ${NativeLibsExtra} ${ZLIB_LIBRARIES}) + + if (CLR_CMAKE_USE_SYSTEM_BROTLI) + find_library(BROTLIDEC brotlidec REQUIRED) + find_library(BROTLIENC brotlienc REQUIRED) + + list(APPEND ${NativeLibsExtra} ${BROTLIDEC} ${BROTLIENC}) + endif () endmacro()