From d2ecdf1cbc404d6c4cbeab7b022acdd10b6be58f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szczepan=20=C4=86wikli=C5=84ski?= Date: Fri, 22 Nov 2024 11:02:34 +0100 Subject: [PATCH 1/3] Find to help Brotli headers when doing VMR build under FreeBSD --- src/native/libs/System.IO.Compression.Native/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/native/libs/System.IO.Compression.Native/CMakeLists.txt b/src/native/libs/System.IO.Compression.Native/CMakeLists.txt index e13e1271809b1..a67fc2d946089 100644 --- a/src/native/libs/System.IO.Compression.Native/CMakeLists.txt +++ b/src/native/libs/System.IO.Compression.Native/CMakeLists.txt @@ -18,6 +18,9 @@ if (NOT CLR_CMAKE_TARGET_BROWSER AND NOT CLR_CMAKE_TARGET_WASI) if (CLR_CMAKE_USE_SYSTEM_BROTLI) add_definitions(-DFEATURE_USE_SYSTEM_BROTLI) + find_package(PkgConfig REQUIRED) + pkg_check_modules(BROTLI REQUIRED libbrotlicommon) + include_directories(${BROTLI_INCLUDE_DIRS}) else () include(${CLR_SRC_NATIVE_DIR}/external/brotli.cmake) From d3531063849580493b1fce853e51be8c73e97d90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szczepan=20=C4=86wikli=C5=84ski?= Date: Sat, 23 Nov 2024 20:41:00 +0100 Subject: [PATCH 2/3] Use existing approach --- src/native/libs/System.IO.Compression.Native/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/native/libs/System.IO.Compression.Native/CMakeLists.txt b/src/native/libs/System.IO.Compression.Native/CMakeLists.txt index a67fc2d946089..bdb73505f3638 100644 --- a/src/native/libs/System.IO.Compression.Native/CMakeLists.txt +++ b/src/native/libs/System.IO.Compression.Native/CMakeLists.txt @@ -18,9 +18,9 @@ if (NOT CLR_CMAKE_TARGET_BROWSER AND NOT CLR_CMAKE_TARGET_WASI) if (CLR_CMAKE_USE_SYSTEM_BROTLI) add_definitions(-DFEATURE_USE_SYSTEM_BROTLI) - find_package(PkgConfig REQUIRED) - pkg_check_modules(BROTLI REQUIRED libbrotlicommon) - include_directories(${BROTLI_INCLUDE_DIRS}) + if (CLR_CMAKE_TARGET_FREEBSD) + set(CMAKE_REQUIRED_INCLUDES ${CROSS_ROOTFS}/usr/local/include) + endif() else () include(${CLR_SRC_NATIVE_DIR}/external/brotli.cmake) From 85f0dfccec81764b8f826dd8df3f70c1d0712655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szczepan=20=C4=86wikli=C5=84ski?= Date: Tue, 3 Dec 2024 20:50:33 +0100 Subject: [PATCH 3/3] Use CLR_CMAKE_HOST_FREEBSD --- src/native/libs/System.IO.Compression.Native/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/native/libs/System.IO.Compression.Native/CMakeLists.txt b/src/native/libs/System.IO.Compression.Native/CMakeLists.txt index bdb73505f3638..5df69d109c387 100644 --- a/src/native/libs/System.IO.Compression.Native/CMakeLists.txt +++ b/src/native/libs/System.IO.Compression.Native/CMakeLists.txt @@ -18,7 +18,7 @@ if (NOT CLR_CMAKE_TARGET_BROWSER AND NOT CLR_CMAKE_TARGET_WASI) if (CLR_CMAKE_USE_SYSTEM_BROTLI) add_definitions(-DFEATURE_USE_SYSTEM_BROTLI) - if (CLR_CMAKE_TARGET_FREEBSD) + if (CLR_CMAKE_HOST_FREEBSD) set(CMAKE_REQUIRED_INCLUDES ${CROSS_ROOTFS}/usr/local/include) endif() else ()