kou commented on code in PR #13939:
URL: https://github.com/apache/arrow/pull/13939#discussion_r952031146


##########
cpp/src/arrow/engine/CMakeLists.txt:
##########
@@ -58,7 +58,11 @@ foreach(LIB_TARGET ${ARROW_SUBSTRAIT_LIBRARIES})
   target_compile_definitions(${LIB_TARGET} PRIVATE ARROW_ENGINE_EXPORTING)
 endforeach()
 
-set(ARROW_SUBSTRAIT_TEST_LINK_LIBS ${ARROW_SUBSTRAIT_LINK_lIBS} 
${ARROW_TEST_LINK_LIBS})
+if(NOT ARROW_SUBSTRAIT_LINK_LIBS)
+  set(ARROW_SUBSTRAIT_LINK_LIBS substrait)

Review Comment:
   Could you try the following without your changes?
   
   ```diff
   diff --git a/cpp/cmake_modules/BuildUtils.cmake 
b/cpp/cmake_modules/BuildUtils.cmake
   index 888ca19af5..2b65fcc5f0 100644
   --- a/cpp/cmake_modules/BuildUtils.cmake
   +++ b/cpp/cmake_modules/BuildUtils.cmake
   @@ -399,7 +399,7 @@ function(ADD_ARROW_LIB LIB_NAME)
        endif()
    
        if(ARG_STATIC_LINK_LIBS)
   -      target_link_libraries(${LIB_NAME}_static LINK_PRIVATE
   +      target_link_libraries(${LIB_NAME}_static PUBLIC
                                "$<BUILD_INTERFACE:${ARG_STATIC_LINK_LIBS}>")
          if(USE_OBJLIB)
            # Ensure that dependencies are built before compilation of objects 
in
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to