vcpkg/ports/arrow/brotli.patch

29 lines
936 B
Diff
Raw Normal View History

diff --git a/cpp/cmake_modules/FindBrotli.cmake b/cpp/cmake_modules/FindBrotli.cmake
index 4053b79ca7..bdca85fab4 100644
--- a/cpp/cmake_modules/FindBrotli.cmake
+++ b/cpp/cmake_modules/FindBrotli.cmake
@@ -21,6 +21,23 @@ if(Brotli_FOUND)
return()
endif()
+if(ARROW_PACAKGE_KIND STREQUAL "vcpkg")
+ set(find_package_args "")
+ if(Brotli_FIND_VERSION)
+ list(APPEND find_package_args ${Brotli_FIND_VERSION})
+ endif()
+ if(Brotli_FIND_QUIETLY)
+ list(APPEND find_package_args QUIET)
+ endif()
+ find_package(Brotli NAMES unofficial-brotli ${find_package_args})
+ if(Brotli_FOUND)
+ add_library(Brotli::brotlicommon ALIAS unofficial::brotli::brotlicommon)
+ add_library(Brotli::brotlienc ALIAS unofficial::brotli::brotlienc)
+ add_library(Brotli::brotlidec ALIAS unofficial::brotli::brotlidec)
+ return()
+ endif()
+endif()
+
if(ARROW_BROTLI_USE_SHARED)
set(BROTLI_COMMON_LIB_NAMES
brotlicommon