js8544 commented on code in PR #34159:
URL: https://github.com/apache/arrow/pull/34159#discussion_r1105259997


##########
cpp/cmake_modules/ThirdpartyToolchain.cmake:
##########
@@ -4727,20 +4735,38 @@ macro(build_awssdk)
     set(AWSSDK_BUILD_TYPE release)
   endif()
 
+  # provide hint for AWS SDK to link with the already located openssl
+  get_filename_component(OPENSSL_ROOT_HINT "${OPENSSL_INCLUDE_DIR}" DIRECTORY)
+  if(APPLE AND NOT OPENSSL_ROOT_HINT)
+    find_program(BREW brew)
+    if(BREW)
+      execute_process(COMMAND ${BREW} --prefix "[email protected]"
+                      OUTPUT_VARIABLE OPENSSL11_BREW_PREFIX
+                      OUTPUT_STRIP_TRAILING_WHITESPACE)
+      if(OPENSSL11_BREW_PREFIX)
+        set(OPENSSL_ROOT_HINT ${OPENSSL11_BREW_PREFIX})
+      else()
+        execute_process(COMMAND ${BREW} --prefix "openssl"
+                        OUTPUT_VARIABLE OPENSSL_BREW_PREFIX
+                        OUTPUT_STRIP_TRAILING_WHITESPACE)
+        if(OPENSSL_BREW_PREFIX)
+          set(OPENSSL_ROOT_HINT ${OPENSSL_BREW_PREFIX})
+        endif()
+      endif()
+    endif()
+  endif()

Review Comment:
   I copied it from there: 
https://github.com/apache/arrow/pull/34159/files#diff-5cdc95f4e1b618f2f3ef10d370ce05a1ac05d9d401aecff3ccbb3d76bd366b6aL4831.
 Was it needed in the previous PR?



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