Commit 2f3271c7 authored by Thomas Ives's avatar Thomas Ives
Browse files

FindMySQL.cmake: Search for libmaridb.so first

MariaDB often provides a symlink version of libmysql.so pointing to
libmariadb.so to maintain compatibility with MySQL. So we will find
libmysql.so regardless of whether we are linking against MySQL or
MariaDB.  By searching for libmariadb.so first we make it clearer in the
cmake output that we are linking against MariaDB rather than MySQL.
parent 558fee4c
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -75,8 +75,8 @@ find_path(MySQL_INCLUDE_DIR
unset(_mysql_inc_paths)

if (WIN32)
    set(_mysql_release_names libmysql libmariadb)
    set(_mysql_debug_names libmysqld libmariadbd)
    set(_mysql_release_names libmariadb libmysql)
    set(_mysql_debug_names libmariadbd libmysqld)
    set(_mysql_lib_paths
        "$ENV{ProgramFiles}/MySQL/*/lib"
        "$ENV{ProgramFiles\(x86\)}/MySQL/*/lib"
@@ -86,8 +86,8 @@ if (WIN32)
        "$ENV{ProgramFiles\(x86\)}/MariaDB/lib"
        )
else()
    set(_mysql_release_names mysqlclient mysqlclient_r mariadb)
    set(_mysql_debug_names mysqlclient mysqlclient_r mariadb)
    set(_mysql_release_names mariadb mysqlclient mysqlclient_r)
    set(_mysql_debug_names mariadb mysqlclient mysqlclient_r)
endif()

find_library(MySQL_LIBRARY_RELEASE