Skip to content

Commit

Permalink
Update cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
LinZhihao-723 committed Nov 10, 2024
1 parent e12ff43 commit a0fcffe
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions components/core/cmake/Modules/FindMariaDBClient.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit a0fcffe

Please sign in to comment.