Skip to content

Commit

Permalink
[GLUTEN-6529] Fix build error on macOS caused by ConfigArrow.cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
xumingming committed Jul 20, 2024
1 parent 8a2ac2a commit 0aa9293
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cpp/CMake/ConfigArrow.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,16 @@ function(FIND_ARROW_LIB LIB_NAME)
message(FATAL_ERROR "Arrow library Not Found: ${ARROW_LIB_FULL_NAME}")
endif()
message(STATUS "Found Arrow library: ${ARROW_LIB_${LIB_NAME}}")

# Get the parent-parent directory of the lib file.
# sample value for ${ARROW_LIB_${LIB_NAME}}: /usr/local/lib/libarrow.a
# sample result for ${ARROW_LIB_INCLUDE_DIR}: /usr/local
# Then we can get our include directory: /usr/local/include
get_filename_component(ARROW_LIB_INCLUDE_DIR "${ARROW_LIB_${LIB_NAME}}" PATH)
get_filename_component(ARROW_LIB_INCLUDE_DIR "${ARROW_LIB_INCLUDE_DIR}" PATH)

set_target_properties(Arrow::${LIB_NAME}
PROPERTIES IMPORTED_LOCATION ${ARROW_LIB_${LIB_NAME}})
PROPERTIES IMPORTED_LOCATION ${ARROW_LIB_${LIB_NAME}}
INTERFACE_INCLUDE_DIRECTORIES ${ARROW_LIB_INCLUDE_DIR}/include)
endif()
endfunction()

0 comments on commit 0aa9293

Please sign in to comment.