raulcd commented on code in PR #50195:
URL: https://github.com/apache/arrow/pull/50195#discussion_r3459660199


##########
cpp/src/arrow/CMakeLists.txt:
##########
@@ -984,21 +979,38 @@ if(ARROW_FILESYSTEM)
     endforeach()
   endif()
   if(ARROW_S3)
-    foreach(ARROW_FILESYSTEM_TARGET ${ARROW_FILESYSTEM_TARGETS})
-      target_link_libraries(${ARROW_FILESYSTEM_TARGET} PRIVATE 
${AWSSDK_LINK_LIBRARIES})
+    if(NOT ARROW_BUILD_SHARED AND ARROW_BUILD_STATIC)
+      string(APPEND ARROW_S3_PC_CFLAGS "${ARROW_S3_PC_CFLAGS_PRIVATE}")
+      set(ARROW_S3_PC_CFLAGS_PRIVATE "")

Review Comment:
   From what I remember, this is used to populate the following:
   ```
   Cflags:@ARROW_S3_PC_CFLAGS@
   Cflags.private:@ARROW_S3_PC_CFLAGS_PRIVATE@
   ```
   on `arrow/cpp/src/arrow/arrow-s3.pc.in` this is using the same mechanism we 
introduced for other libraries here:
   
https://github.com/apache/arrow/commit/3351aebc357ea48a147956de1ededf1a234858b0
   
   Something to do with pkg-config and static builds, @kou might share some 
light on why this was necessary I hardly remember but can re-explore again.



-- 
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