Skip to content

Commit

Permalink
Fix build with -DCLR_CMAKE_USE_SYSTEM_BROTLI=true (#110816)
Browse files Browse the repository at this point in the history
  • Loading branch information
omajid authored Dec 20, 2024
1 parent 9e7d746 commit b382a45
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/native/libs/System.IO.Compression.Native/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
7 changes: 7 additions & 0 deletions src/native/libs/System.IO.Compression.Native/extra_libs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,11 @@ macro(append_extra_compression_libs NativeLibsExtra)
list(APPEND ZLIB_LIBRARIES $<IF:$<BOOL:${CLR_CMAKE_USE_SYSTEM_ZLIB}>,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()

0 comments on commit b382a45

Please sign in to comment.