Skip to content

Commit

Permalink
Ensure using bundled zlib
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jul 3, 2024
1 parent 53dde0d commit 5a3817b
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4508,8 +4508,12 @@ function(build_orc)
set(LZ4_HOME
${LZ4_ROOT}
CACHE BOOL "" FORCE)
set(LZ4_LIBRARY $<TARGET_FILE:LZ4::lz4>)
set(LZ4_STATIC_LIB $<TARGET_FILE:LZ4::lz4>)
set(LZ4_LIBRARY
LZ4::lz4
CACHE STRING "" FORCE)
set(LZ4_STATIC_LIB
LZ4::lz4
CACHE STRING "" FORCE)

get_target_property(PROTOBUF_INCLUDE_DIR ${ARROW_PROTOBUF_LIBPROTOBUF}
INTERFACE_INCLUDE_DIRECTORIES)
Expand All @@ -4529,14 +4533,23 @@ function(build_orc)
${Snappy_ROOT}
CACHE BOOL "" FORCE)
set(SNAPPY_LIBRARY
$<TARGET_FILE:${Snappy_TARGET}>
${Snappy_TARGET}
CACHE STRING "" FORCE)

get_target_property(ZLIB_INCLUDE_DIR ZLIB::ZLIB INTERFACE_INCLUDE_DIRECTORIES)
get_filename_component(ZLIB_ROOT "${ZLIB_INCLUDE_DIR}" DIRECTORY)
set(ZLIB_HOME
${ZLIB_ROOT}
CACHE BOOL "" FORCE)
set(ZLIB_LIBRARY
ZLIB::ZLIB
CACHE STRING "" FORCE)
get_target_property(ZLIB_TYPE ZLIB::ZLIB TYPE)
if(ZLIB_TYPE STREQUAL "STATIC_LIBRARY")
set(ZLIB_STATIC_LIB
ZLIB::ZLIB
CACHE STRING "" FORCE)
endif()

get_target_property(ZSTD_INCLUDE_DIR ${ARROW_ZSTD_LIBZSTD}
INTERFACE_INCLUDE_DIRECTORIES)
Expand Down

0 comments on commit 5a3817b

Please sign in to comment.