This is an automated email from the ASF dual-hosted git repository.

philo pushed a commit to branch branch-1.2
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git


The following commit(s) were added to refs/heads/branch-1.2 by this push:
     new 3e6e7dfbd [GLUTEN-6529][VL] Branch-1.2: Port #6530 to fix build error 
on macOS caused by ConfigArrow.cmake (#6541)
3e6e7dfbd is described below

commit 3e6e7dfbdbb497bd4b28a2af5eef3527e0a133f8
Author: James Xu <[email protected]>
AuthorDate: Mon Jul 22 10:17:12 2024 +0800

    [GLUTEN-6529][VL] Branch-1.2: Port #6530 to fix build error on macOS caused 
by ConfigArrow.cmake (#6541)
---
 cpp/CMake/ConfigArrow.cmake | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/cpp/CMake/ConfigArrow.cmake b/cpp/CMake/ConfigArrow.cmake
index 961b4e7a2..c9cbed525 100644
--- a/cpp/CMake/ConfigArrow.cmake
+++ b/cpp/CMake/ConfigArrow.cmake
@@ -40,7 +40,21 @@ 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}}")
-    set_target_properties(Arrow::${LIB_NAME}
-                          PROPERTIES IMPORTED_LOCATION 
${ARROW_LIB_${LIB_NAME}})
+
+    # Get the parent-parent directory of the lib file. For example:
+    #
+    # * ${ARROW_LIB_${LIB_NAME}}: /usr/local/lib/libarrow.a
+    # * ${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}}
+                 INTERFACE_INCLUDE_DIRECTORIES 
${ARROW_LIB_INCLUDE_DIR}/include)
   endif()
 endfunction()


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to