diff --git a/cpp/cmake_modules/Findutf8proc.cmake b/cpp/cmake_modules/Findutf8proc.cmake index 2f0f59a02c..f5382a8f21 100644 --- a/cpp/cmake_modules/Findutf8proc.cmake +++ b/cpp/cmake_modules/Findutf8proc.cmake @@ -19,6 +19,21 @@ if(utf8proc_FOUND) return() endif() +if(ARROW_PACAKGE_KIND STREQUAL "vcpkg") + set(find_package_args "") + if(utf8proc_FIND_VERSION) + list(APPEND find_package_args ${utf8proc_FIND_VERSION}) + endif() + if(utf8proc_FIND_QUIETLY) + list(APPEND find_package_args QUIET) + endif() + find_package(utf8proc NAMES unofficial-utf8proc ${find_package_args}) + if(utf8proc_FOUND) + add_library(utf8proc::utf8proc ALIAS utf8proc) + return() + endif() +endif() + function(extract_utf8proc_version) if(utf8proc_INCLUDE_DIR) file(READ "${utf8proc_INCLUDE_DIR}/utf8proc.h" UTF8PROC_H_CONTENT)