Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARROW-18072: [C++] Can't use bundled ORC with CMake 3.10 #14432

Merged
merged 1 commit into from
Oct 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4338,13 +4338,18 @@ macro(build_orc)
set_target_properties(orc::liborc
PROPERTIES IMPORTED_LOCATION "${ORC_STATIC_LIB}"
INTERFACE_INCLUDE_DIRECTORIES "${ORC_INCLUDE_DIR}")
target_link_libraries(orc::liborc INTERFACE LZ4::lz4 ZLIB::ZLIB ${ARROW_ZSTD_LIBZSTD}
${Snappy_TARGET})
set(ORC_LINK_LIBRARIES LZ4::lz4 ZLIB::ZLIB ${ARROW_ZSTD_LIBZSTD} ${Snappy_TARGET})
if(NOT MSVC)
if(NOT APPLE)
target_link_libraries(orc::liborc INTERFACE Threads::Threads)
list(APPEND ORC_LINK_LIBRARIES Threads::Threads)
endif()
target_link_libraries(orc::liborc INTERFACE ${CMAKE_DL_LIBS})
list(APPEND ORC_LINK_LIBRARIES ${CMAKE_DL_LIBS})
endif()
if(CMAKE_VERSION VERSION_LESS 3.11)
set_target_properties(orc::liborc PROPERTIES INTERFACE_LINK_LIBRARIES
"${ORC_LINK_LIBRARIES}")
else()
target_link_libraries(orc::liborc INTERFACE ${ORC_LINK_LIBRARIES})
endif()

add_dependencies(toolchain orc_ep)
Expand Down