From a0fcffecc1ef934bcd406d09138ed38774562a88 Mon Sep 17 00:00:00 2001 From: LinZhihao-723 Date: Sat, 9 Nov 2024 22:36:11 -0500 Subject: [PATCH] Update cmake --- components/core/cmake/Modules/FindMariaDBClient.cmake | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/components/core/cmake/Modules/FindMariaDBClient.cmake b/components/core/cmake/Modules/FindMariaDBClient.cmake index 4d13436e5..5801be2e6 100644 --- a/components/core/cmake/Modules/FindMariaDBClient.cmake +++ b/components/core/cmake/Modules/FindMariaDBClient.cmake @@ -23,12 +23,15 @@ pkg_check_modules(mariadbclient_PKGCONF QUIET "lib${mariadbclient_LIBNAME}") if(NOT mariadbclient_PKGCONF_FOUND AND APPLE) execute_process( COMMAND brew --prefix mariadb-connector-c - RESULT_VARIABLE brew_result + RESULT_VARIABLE mariadbclient_BREW_RESULT OUTPUT_VARIABLE mariadbclient_MACOS_PREFIX - ERROR_QUIET ) - if(NOT brew_result EQUAL 0) - message(FATAL_ERROR "mariadb-connector-c not found in Homebrew") + if(NOT mariadbclient_BREW_RESULT EQUAL 0) + message( + FATAL_ERROR + "pkg-config cannot find ${mariadbclient_LIBNAME} and mariadb-connector-c isn't" + " installed via Homebrew" + ) endif() string(STRIP "${mariadbclient_MACOS_PREFIX}" mariadbclient_MACOS_PREFIX) list(PREPEND CMAKE_PREFIX_PATH ${mariadbclient_MACOS_PREFIX})