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


##########
cpp/cmake_modules/ThirdpartyToolchain.cmake:
##########
@@ -5039,6 +5054,154 @@ if(ARROW_S3)
   endif()
 endif()
 
+# ----------------------------------------------------------------------
+# Azure SDK for C++
+
+macro(build_azuresdk)
+  message(STATUS "Building Azure C++ SDK from source")
+
+  find_curl()
+  find_package(LibXml2 REQUIRED)
+  add_custom_target(azure_sdk_dependencies)
+  
+  if(NOT OpenSSL_FOUND)
+    resolve_dependency(OpenSSL HAVE_ALT REQUIRED_VERSION
+                        ${ARROW_OPENSSL_REQUIRED_VERSION})
+  endif()
+
+  set(AZURESDK_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/azuresdk_ep-install")
+  set(AZURESDK_INCLUDE_DIR "${AZURESDK_PREFIX}/include")
+  set(AZURESDK_LIB_DIR "lib")
+
+  set(AZURESDK_COMMON_CMAKE_ARGS
+      ${EP_COMMON_CMAKE_ARGS}
+      "-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>"
+      "-DCMAKE_PREFIX_PATH=${AZURESDK_PREFIX}"
+      -DBUILD_SHARED_LIBS=OFF
+      -DCMAKE_INSTALL_LIBDIR=${AZURESDK_LIB_DIR}
+      -DDISABLE_AZURE_CORE_OPENTELEMETRY=ON
+      -DENABLE_TESTING=OFF
+      -DENABLE_UNITY_BUILD=ON
+      -DWARNINGS_AS_ERRORS=OFF)
+  
+  STRING(REPLACE "." ";" OPENSSL_VERSION_ELEMENTS_LIST ${OPENSSL_VERSION}) 
+  list(GET OPENSSL_VERSION_ELEMENTS_LIST 0 OPENSSL_VERSION_MAJOR)
+  if(OPENSSL_VERSION_MAJOR EQUAL 1)
+    list(APPEND
+    AZURESDK_COMMON_CMAKE_ARGS
+    
-DVCPKG_OVERLAY_PORTS=${CMAKE_CURRENT_BINARY_DIR}/azuresdk_ep-prefix/src/azuresdk_ep/vcpkg-custom-ports)
+  elseif(OPENSSL_VERSION_MAJOR EQUAL 3)
+  else()
+    message(FATAL_ERROR "Unknown OpenSSL version: ${OPENSSL_VERSION}")
+  endif()

Review Comment:
   Hmm. It seems that this uses OpenSSL in vcpkg not on system.
   We use system OpenSSL in other places. So this will mix system OpenSSL and 
vcpkg's OpenSSL.
   
   The following documents may help us:
   * 
https://github.com/Azure/azure-sdk-for-cpp#using-the-system-package-manager-to-install-openssl
   * 
https://devblogs.microsoft.com/cppblog/using-system-package-manager-dependencies-with-vcpkg/



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