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

kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 7e19111f2f GH-34801: [C++] Remove needless "Requires.private: libcurl 
openssl" from arrow.pc (#34810)
7e19111f2f is described below

commit 7e19111f2f81a4c0a8b3465f04a6b9f3ba4a06f1
Author: Sutou Kouhei <[email protected]>
AuthorDate: Sat Apr 1 07:20:54 2023 +0900

    GH-34801: [C++] Remove needless "Requires.private: libcurl openssl" from 
arrow.pc (#34810)
    
    ### Rationale for this change
    
    We need "Requires.prviate: libcurl openssl" in arrow.pc only when we use 
static AWS SDK for C++ (bundled AWS SDK for C++).
    
    In general, "Requires.private: libcurl openssl" is harmless with system 
(shared) AWS SDK for C++. But "openssl" is harmful on macOS with Homebrew 
because OpenSSL from Homebrew isn't installed to `$(brew --prefix)`. It means 
that users who want to use OpenSSL from Homebrew need to refer OpenSSL by 
`$(brew --prefix openssl@ 1.1)` or `$(brew --prefix openssl@ 3.0)` explicitly.
    
    So it's helpful that we don't add needless "Requires.private: libcurl 
openssl" to arrow.pc.
    
    ### What changes are included in this PR?
    
    These changes stop adding `Requires.private: libcurl openssl` when we use 
system AWS SDK for C++.
    
    ### Are these changes tested?
    
    Yes.
    
    ### Are there any user-facing changes?
    
    Yes.
    * Closes: #34801
    
    Authored-by: Sutou Kouhei <[email protected]>
    Signed-off-by: Sutou Kouhei <[email protected]>
---
 cpp/cmake_modules/ThirdpartyToolchain.cmake | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake 
b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index bee62f3b90..caf33f224b 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -5076,11 +5076,12 @@ if(ARROW_S3)
       foreach(AWSSDK_LINK_LIBRARY ${AWSSDK_LINK_LIBRARIES})
         string(APPEND ARROW_PC_LIBS_PRIVATE " 
$<TARGET_FILE:${AWSSDK_LINK_LIBRARY}>")
       endforeach()
+    else()
+      if(UNIX)
+        string(APPEND ARROW_PC_REQUIRES_PRIVATE " libcurl")
+      endif()
+      string(APPEND ARROW_PC_REQUIRES_PRIVATE " openssl")
     endif()
-    if(UNIX)
-      string(APPEND ARROW_PC_REQUIRES_PRIVATE " libcurl")
-    endif()
-    string(APPEND ARROW_PC_REQUIRES_PRIVATE " openssl")
   endif()
 
   if(APPLE)

Reply via email to