Skip to content

Commit

Permalink
Set ZLIB::ZLIB's include directory for Emscripten
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jul 4, 2024
1 parent e9f0d73 commit ba255c5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2532,6 +2532,7 @@ macro(build_zlib)
set_property(TARGET ZLIB::ZLIB
PROPERTY IMPORTED_LOCATION
"${EMSCRIPTEN_SYSROOT}/lib/wasm32-emscripten/pic/libz.a")
target_include_directories(ZLIB::ZLIB INTERFACE "${EMSCRIPTEN_SYSROOT}/include")
list(APPEND ARROW_BUNDLED_STATIC_LIBS ZLIB::ZLIB)
else()
set(ZLIB_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/zlib_ep/src/zlib_ep-install")
Expand Down Expand Up @@ -4512,7 +4513,7 @@ function(build_orc)
get_filename_component(LZ4_ROOT "${LZ4_INCLUDE_DIR}" DIRECTORY)
set(LZ4_HOME
${LZ4_ROOT}
CACHE BOOL "" FORCE)
CACHE STRING "" FORCE)
set(LZ4_LIBRARY
LZ4::lz4
CACHE STRING "" FORCE)
Expand All @@ -4525,7 +4526,7 @@ function(build_orc)
get_filename_component(Protobuf_ROOT "${PROTOBUF_INCLUDE_DIR}" DIRECTORY)
set(PROTOBUF_HOME
${Protobuf_ROOT}
CACHE BOOL "" FORCE)
CACHE STRING "" FORCE)
target_include_directories(${ARROW_PROTOBUF_LIBPROTOC}
INTERFACE "${PROTOBUF_INCLUDE_DIR}")
set(PROTOBUF_EXECUTABLE $<TARGET_FILE:${ARROW_PROTOBUF_PROTOC}>)
Expand All @@ -4539,7 +4540,7 @@ function(build_orc)
get_filename_component(Snappy_ROOT "${SNAPPY_INCLUDE_DIR}" DIRECTORY)
set(SNAPPY_HOME
${Snappy_ROOT}
CACHE BOOL "" FORCE)
CACHE STRING "" FORCE)
set(SNAPPY_LIBRARY
${Snappy_TARGET}
CACHE STRING "" FORCE)
Expand All @@ -4551,7 +4552,7 @@ function(build_orc)
get_filename_component(ZLIB_ROOT "${ZLIB_INCLUDE_DIR}" DIRECTORY)
set(ZLIB_HOME
${ZLIB_ROOT}
CACHE BOOL "" FORCE)
CACHE STRING "" FORCE)
set(ZLIB_LIBRARY
ZLIB::ZLIB
CACHE STRING "" FORCE)
Expand All @@ -4564,7 +4565,7 @@ function(build_orc)
get_filename_component(ZSTD_ROOT "${ZSTD_INCLUDE_DIR}" DIRECTORY)
set(ZSTD_HOME
${ZSTD_ROOT}
CACHE BOOL "" FORCE)
CACHE STRING "" FORCE)
set(ZSTD_LIBRARY ${ARROW_ZSTD_LIBZSTD})

set(BUILD_CPP_TESTS
Expand Down

0 comments on commit ba255c5

Please sign in to comment.