kou commented on PR #13404: URL: https://github.com/apache/arrow/pull/13404#issuecomment-1163815653
We need to define `CURL_STATICLIB` on building google-cloud-cpp not Apache Arrow C++. But CMake's bundled `FindCURL.cmake` doesn't support `CURL_STATICLIB`: https://gitlab.kitware.com/cmake/cmake/-/issues/18378 How about the following? ```diff diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake index 024859288b..299c131958 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -1067,6 +1067,15 @@ macro(find_curl) "${CURL_LIBRARIES}") endif() endif() + if(WIN32 AND NOT CURL_STATIC_CHECKED) + get_target_property(CURL_LIBRARY CURL::libcurl IMPORTED_LOCATION) + get_filename_component(CURL_LIBRARY_EXT "${CURL_LIBRARY}" LAST_EXT) + if(CURL_LIBRARY_EXT STREQUAL "${CMAKE_STATIC_LIBRARY_SUFFIX}") + set_target_properties(CURL::libcurl + PROPERTIES INTERFACE_COMPILE_DEFINITIONS "CURL_STATICLIB") + endif() + set(CURL_STATIC_CHECKED TRUE) + endif() endmacro() # ---------------------------------------------------------------------- ``` -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org