From 8b50d332de3b0c960dfad2fc839cef8670ea84ad Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Thu, 23 Nov 2023 23:49:58 +0900 Subject: [PATCH] GH-38861: [C++] Add missing "-framework Security" to Libs.private in arrow.pc It's required only when: * We use bundled aws-sdk-cpp. * We use static library for Apache Arrow C++. Because bundled aws-sdk-cpp uses Security framework. --- cpp/cmake_modules/ThirdpartyToolchain.cmake | 3 +++ cpp/src/arrow/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake index 52632d554aaf..17ad8f45424c 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -5063,6 +5063,9 @@ if(ARROW_S3) string(APPEND ARROW_PC_REQUIRES_PRIVATE " libcurl") endif() string(APPEND ARROW_PC_REQUIRES_PRIVATE " openssl") + if(APPLE) + string(APPEND ARROW_PC_LIBS_PRIVATE " -framework Security") + endif() endif() endif() diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt index fde30588a659..b64194aa6ef0 100644 --- a/cpp/src/arrow/CMakeLists.txt +++ b/cpp/src/arrow/CMakeLists.txt @@ -598,7 +598,7 @@ if(ARROW_BUILD_BUNDLED_DEPENDENCIES) IMPORTED_LOCATION) install(FILES ${arrow_bundled_dependencies_path} ${INSTALL_IS_OPTIONAL} DESTINATION ${CMAKE_INSTALL_LIBDIR}) - string(APPEND ARROW_PC_LIBS_PRIVATE " -larrow_bundled_dependencies") + string(PREPEND ARROW_PC_LIBS_PRIVATE " -larrow_bundled_dependencies") list(INSERT ARROW_STATIC_INSTALL_INTERFACE_LIBS 0 "Arrow::arrow_bundled_dependencies") endif()