From 637afd05ae00932066d81373dceb31a872b0a3cc Mon Sep 17 00:00:00 2001 From: JoyBinY <952622038@qq.com> Date: Tue, 9 Apr 2024 15:23:29 +0800 Subject: [PATCH] Update FindMariaDB.cmake Users can use -DCMAKE_LIBRARY_PATH=${INSTALL}/lib without needing to specify mariadb separately like -DCMAKE_LIBRARY_PATH=${INSTALL}/lib/mariadb --- cmake/modules/FindMariaDB.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmake/modules/FindMariaDB.cmake b/cmake/modules/FindMariaDB.cmake index 3f8f85847..20b0e0cfb 100644 --- a/cmake/modules/FindMariaDB.cmake +++ b/cmake/modules/FindMariaDB.cmake @@ -43,7 +43,10 @@ else() NAMES mariadb_version.h PATH_SUFFIXES mariadb mysql ) - find_library(MariaDB_LIBRARY NAMES mariadb) + find_library(MariaDB_LIBRARY + NAMES mariadb + PATH_SUFFIXES mariadb mysql + ) endif() include(FindPackageHandleStandardArgs) @@ -61,4 +64,4 @@ if(MariaDB_FOUND AND NOT TARGET MariaDB::MariaDB) IMPORTED_LINK_INTERFACE_LANGUAGES "C") endif() -mark_as_advanced(MariaDB_INCLUDE_DIR MariaDB_LIBRARY) \ No newline at end of file +mark_as_advanced(MariaDB_INCLUDE_DIR MariaDB_LIBRARY)