kou commented on issue #15139:
URL: https://github.com/apache/arrow/issues/15139#issuecomment-1368951313
Could you try the following patch with
`PKG_CONFIG_PATH=D:/dev/checkouts/external/arrow.git/cpp/vcpkg_installed/x64-windows-static-md/lib/pkgconfig`?
```diff
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake
b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index 3eda538fb2..95d425d95d 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -2571,7 +2571,28 @@ endmacro()
if(ARROW_WITH_BZ2)
resolve_dependency(BZip2)
if(${BZip2_SOURCE} STREQUAL "SYSTEM")
- string(APPEND ARROW_PC_LIBS_PRIVATE " ${BZIP2_LIBRARIES}")
+ set(ARROW_BZIP2_CONFIGS "")
+ if(BZIP2_LIBRARY_RELEASE)
+ string(APPEND ARROW_PC_LIBS_PRIVATE "
release[$<$<CONFIG:RELEASE>:${BZIP2_LIBRARY_RELEASE}>]")
+ list(APPEND ARROW_BZIP2_CONFIGS "$<CONFIG:RELEASE>")
+ endif()
+ if(BZIP2_LIBRARY_DEBUG)
+ string(APPEND ARROW_PC_LIBS_PRIVATE "
debug[$<$<CONFIG:DEBUG:${BZIP2_LIBRARY_DEBUG}>]")
+ list(APPEND ARROW_BZIP2_CONFIGS "$<CONFIG:DEBUG>")
+ endif()
+ string(APPEND ARROW_PC_LIBS_PRIVATE " other[$<$<NOT:$<OR:")
+ if(CMAKE_VERSION VERSION_LESS "3.12")
+ string(REPLACE ";" "," ARROW_BZIP2_CONFIGS_CSV
"${ARROW_BZIP2_CONFIGS}")
+ else()
+ list(JOIN ARROW_BZIP2_CONFIGS "," ARROW_BZIP2_CONFIGS_CSV)
+ endif()
+ string(APPEND ARROW_PC_LIBS_PRIVATE "${ARROW_BZIP2_CONFIGS_CSV}>>:")
+ if(BZIP2_LIBRARY)
+ string(APPEND ARROW_PC_LIBS_PRIVATE "${BZIP2_LIBRARY}")
+ else()
+ string(APPEND ARROW_PC_LIBS_PRIVATE "${BZIP2_LIBRARIES}")
+ endif()
+ string(APPEND ARROW_PC_LIBS_PRIVATE ">]")
endif()
if(NOT TARGET BZip2::BZip2)
```
BTW, how did you install `pkg-config`? vcpkg? Chocolatey? If you use
Chocolatey not vcpkg, could you try `pkgconf` vcpkg port instead?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]