Skip to content
Merged
Show file tree
Hide file tree
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
25 changes: 17 additions & 8 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,23 @@ set(ARROW_SHARED_INSTALL_INTERFACE_LIBS)
set(ARROW_STATIC_LINK_LIBS arrow::flatbuffers arrow::hadoop)
set(ARROW_STATIC_INSTALL_INTERFACE_LIBS)

# We must use google-cloud-cpp::storage first. If
# google-cloud-cpp::storage depends on bundled Abseil, bundled Abseil
# and system Abseil may be mixed.
#
# For example, if Boost::headers is used before
# google-cloud-cpp::storage AND Boost::headers has
# -I/opt/homebrew/include AND /opt/homebrew/include/absl/ exists,
# /opt/homebrew/include/absl/**/*.h are used instead of .h provided by
# bundled Abseil.
if(ARROW_GCS)
list(APPEND ARROW_SHARED_LINK_LIBS google-cloud-cpp::storage)
list(APPEND ARROW_STATIC_LINK_LIBS google-cloud-cpp::storage)
if(google_cloud_cpp_storage_SOURCE STREQUAL "SYSTEM")
list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS google-cloud-cpp::storage)
endif()
endif()

if(ARROW_USE_BOOST)
list(APPEND ARROW_SHARED_LINK_LIBS Boost::headers)
list(APPEND ARROW_STATIC_LINK_LIBS Boost::headers)
Expand Down Expand Up @@ -725,14 +742,6 @@ if(ARROW_ORC)
endif()
endif()

if(ARROW_GCS)
list(APPEND ARROW_SHARED_LINK_LIBS google-cloud-cpp::storage)
list(APPEND ARROW_STATIC_LINK_LIBS google-cloud-cpp::storage)
if(google_cloud_cpp_storage_SOURCE STREQUAL "SYSTEM")
list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS google-cloud-cpp::storage)
endif()
endif()

if(ARROW_USE_GLOG)
list(APPEND ARROW_SHARED_LINK_LIBS glog::glog)
list(APPEND ARROW_STATIC_LINK_LIBS glog::glog)
Expand Down
10 changes: 8 additions & 2 deletions cpp/src/arrow/flight/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,19 @@ add_arrow_lib(arrow_flight
SHARED_LINK_FLAGS
${ARROW_VERSION_SCRIPT_FLAGS} # Defined in cpp/arrow/CMakeLists.txt
SHARED_LINK_LIBS
arrow_shared
# We must use gRPC::grpc++ first. If gRPC::grpc++
# depends on bundled Abseil, bundled Abseil and system
# Abseil may be mixed.
#
# See also a comment for "if(ARROW_GCS)" in
# cpp/CMakeLists.txt.
${ARROW_FLIGHT_LINK_LIBS}
arrow_shared
SHARED_INSTALL_INTERFACE_LIBS
Arrow::arrow_shared
STATIC_LINK_LIBS
arrow_static
${ARROW_FLIGHT_LINK_LIBS}
arrow_static
STATIC_INSTALL_INTERFACE_LIBS
Arrow::arrow_static)

Expand Down