Skip to content

GH-46084: [C++] Always use ARROW_VCPKG to detect vcpkg mode #46467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cpp/cmake_modules/FindBrotliAlt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if(BrotliAlt_FOUND)
return()
endif()

if(ARROW_PACKAGE_KIND STREQUAL "vcpkg" OR ARROW_PACKAGE_KIND STREQUAL "conan")
if(ARROW_VCPKG OR ARROW_PACKAGE_KIND STREQUAL "conan")
set(find_package_args "")
if(BrotliAlt_FIND_VERSION)
list(APPEND find_package_args ${BrotliAlt_FIND_VERSION})
Expand All @@ -32,14 +32,14 @@ if(ARROW_PACKAGE_KIND STREQUAL "vcpkg" OR ARROW_PACKAGE_KIND STREQUAL "conan")
if(BrotliAlt_FIND_REQUIRED)
list(APPEND find_package_args REQUIRED)
endif()
if(ARROW_PACKAGE_KIND STREQUAL "vcpkg")
if(ARROW_VCPKG)
find_package(BrotliAlt NAMES unofficial-brotli ${find_package_args})
else()
find_package(BrotliAlt NAMES brotli ${find_package_args})
endif()
set(Brotli_FOUND ${BrotliAlt_FOUND})
if(BrotliAlt_FOUND)
if(ARROW_PACKAGE_KIND STREQUAL "vcpkg")
if(ARROW_VCPKG)
add_library(Brotli::brotlicommon ALIAS unofficial::brotli::brotlicommon)
add_library(Brotli::brotlienc ALIAS unofficial::brotli::brotlienc)
add_library(Brotli::brotlidec ALIAS unofficial::brotli::brotlidec)
Expand Down
2 changes: 1 addition & 1 deletion cpp/cmake_modules/Findutf8proc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if(utf8proc_FOUND)
return()
endif()

if(ARROW_PACKAGE_KIND STREQUAL "vcpkg" OR VCPKG_TOOLCHAIN)
if(ARROW_VCPKG)
set(find_package_args "")
if(utf8proc_FIND_VERSION)
list(APPEND find_package_args ${utf8proc_FIND_VERSION})
Expand Down
2 changes: 1 addition & 1 deletion cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2906,7 +2906,7 @@ endmacro()

if(ARROW_WITH_UTF8PROC)
set(utf8proc_resolve_dependency_args utf8proc PC_PACKAGE_NAMES libutf8proc)
if(NOT VCPKG_TOOLCHAIN)
if(NOT ARROW_VCPKG)
# utf8proc in vcpkg doesn't provide version information:
# https://github.com/microsoft/vcpkg/issues/39176
list(APPEND utf8proc_resolve_dependency_args REQUIRED_VERSION "2.2.0")
Expand Down
Loading