From fb7fb0db60aac7e48f6434b48aa23ada5c4885a2 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Mon, 17 Jul 2023 22:18:18 +0900 Subject: [PATCH] GH-36707: [C++] Use ARROW_PACKAGE_PREFIX for OPENSSL_ROOT_DIR too (#36710) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### Rationale for this change In general, a CMake package uses `${PACKAGE}_ROOT` variable to detect `PACKAGE` but `FindOpenSSL.cmake` uses `OPENSSL_ROOT_DIR` not `OpenSSL_ROOT`. ### What changes are included in this PR? Set `OPENSSL_ROOT_DIR` explicitly. ### Are these changes tested? Yes. ### Are there any user-facing changes? Yes. * Closes: #36707 Authored-by: Sutou Kouhei Signed-off-by: Raúl Cumplido --- cpp/cmake_modules/ThirdpartyToolchain.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake index 57defe0b36242..635bc1684e6f2 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -138,6 +138,9 @@ if(ARROW_PACKAGE_PREFIX) if(NOT ENV{Boost_ROOT}) set(ENV{Boost_ROOT} ${ARROW_PACKAGE_PREFIX}) endif() + if(NOT DEFINED OPENSSL_ROOT_DIR) + set(OPENSSL_ROOT_DIR ${ARROW_PACKAGE_PREFIX}) + endif() endif() # For each dependency, set dependency source to global default, if unset