Skip to content

Commit

Permalink
apacheGH-42017: [CI][Python][C++] Fix utf8proc detection for wheel on…
Browse files Browse the repository at this point in the history
… Windows
  • Loading branch information
kou committed Jun 7, 2024
1 parent 9ee6ea7 commit 4b95f3c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
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")
if(ARROW_PACKAGE_KIND STREQUAL "vcpkg" OR VCPKG_TOOLCHAIN)
set(find_package_args "")
if(utf8proc_FIND_VERSION)
list(APPEND find_package_args ${utf8proc_FIND_VERSION})
Expand Down
12 changes: 7 additions & 5 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2819,11 +2819,13 @@ macro(build_utf8proc)
endmacro()

if(ARROW_WITH_UTF8PROC)
resolve_dependency(utf8proc
PC_PACKAGE_NAMES
libutf8proc
REQUIRED_VERSION
"2.2.0")
set(utf8proc_resolve_dependency_args utf8proc PC_PACKAGE_NAMES libutf8proc)
if(NOT VCPKG_TOOLCHAIN)
# 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")
endif()
resolve_dependency(${utf8proc_resolve_dependency_args})
endif()

macro(build_cares)
Expand Down
3 changes: 0 additions & 3 deletions cpp/cmake_modules/Usevcpkg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,6 @@ set(LZ4_ROOT
CACHE STRING "")

if(CMAKE_HOST_WIN32)
set(utf8proc_MSVC_STATIC_LIB_SUFFIX
""
CACHE STRING "")
set(LZ4_MSVC_LIB_PREFIX
""
CACHE STRING "")
Expand Down

0 comments on commit 4b95f3c

Please sign in to comment.