kou commented on issue #15139:
URL: https://github.com/apache/arrow/issues/15139#issuecomment-1371423416

   > I assume the intention is not to have to do that, though?
   
   It's expected. I thought that `Requires: libbrotlidec libbrotlienc zlib 
liblz4 libzstd` will be generated with `PKG_CONFIG_PATH=...`.
   
   Ah, wait. could you show `Get-ChildItem -Recurse 
D:/dev/checkouts/external/arrow.git/cpp/vcpkg_installed/x64-windows-static-md/`?
   
   You can disable system `pkg-config` search path by `PKG_CONFIG_LIBDIR= 
pkg-config --list-all`.
   
   Sorry. `XXX[...]` is just for debug on my environment...
   
   Could you try the following?
   
   ```diff
   diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake 
b/cpp/cmake_modules/ThirdpartyToolchain.cmake
   index 3eda538fb2..0efaaa0c46 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 " 
$<$<CONFIG:RELEASE>:${BZIP2_LIBRARY_RELEASE}>>")
   +      list(APPEND ARROW_BZIP2_CONFIGS "$<CONFIG:RELEASE>")
   +    endif()
   +    if(BZIP2_LIBRARY_DEBUG)
   +      string(APPEND ARROW_PC_LIBS_PRIVATE " 
$<$<CONFIG:DEBUG:${BZIP2_LIBRARY_DEBUG}>>")
   +      list(APPEND ARROW_BZIP2_CONFIGS "$<CONFIG:DEBUG>")
   +    endif()
   +    string(APPEND ARROW_PC_LIBS_PRIVATE " $<$<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)
   ```
   
   It will generate `Libs: -L${libdir} -larrow 
D:/dev/checkouts/external/arrow.git/cpp/vcpkg_installed/x64-windows-static-md/lib/snappy.lib
 
D:/dev/checkouts/external/arrow.git/cpp/vcpkg_installed/x64-windows-static-md/debug/lib/bz2d.lib`.
 Does this work?  Do we need to change `*.lib` to something?


-- 
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]

Reply via email to