From f209ca4e8726ae7502e06eaea09b5590b9050804 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 8 Nov 2020 00:33:12 +0100
Subject: [PATCH 6/7] Support finding static MariaDB client library

We need to reverse the order to look for mariadb first (and only then
for mysql) because otherwise it would pick up the static library
"libmysqlclient.a" (provided by mingw-w64-mariadb-connector-c during
the shared build (leading to linker errors).

Change-Id: I52f0998a67d4850d6684cdda59fc4523b8549476
---
 cmake/FindMySQL.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmake/FindMySQL.cmake b/cmake/FindMySQL.cmake
index c20e7c9fa5..9346cd55c6 100644
--- a/cmake/FindMySQL.cmake
+++ b/cmake/FindMySQL.cmake
@@ -27,7 +27,7 @@ find_path(MySQL_INCLUDE_DIRS
           PATH_SUFFIXES mysql mariadb)
 
 find_library(MySQL_LIBRARIES
-             NAMES libmysql mysql mysqlclient libmariadb mariadb
+             NAMES libmariadb mariadb mariadbclient libmysql mysql mysqlclient
              HINTS ${PC_MySQL_LIBDIR})
 
 include(FindPackageHandleStandardArgs)
-- 
2.30.0

