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


##########
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:
   It was needed but I should have reused `OPENSSL_ROOT_HINT`. I didn't notice 
it. Sorry.
   Could you try removing this?



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