D28284: Add FindMariaDB.cmake module and use it if MySQL is not found

Wolfgang Bauer noreply at phabricator.kde.org
Fri Jun 12 23:08:27 BST 2020


wbauer added a comment.


  One thing I should note though: we do use a patch to fix things on openSUSE currently, but that's not a problem of this change.
  
  I plan to propose our patch upstream anyway (I originally took it from Arch Linux and didn't really understand why it is needed), although it would actually not be needed anymore with this and a mariadb-connector-c without mysql support ... ;-)
  
  In case you're interested right away, this is it:
  
    diff --git a/cmake/modules/FindMySQL.cmake b/cmake/modules/FindMySQL.cmake
    index 0bd7fdfd07..8973729f1f 100644
    --- a/cmake/modules/FindMySQL.cmake
    +++ b/cmake/modules/FindMySQL.cmake
    @@ -38,14 +38,16 @@ if(MYSQLCONFIG_EXECUTABLE)
             OUTPUT_STRIP_TRAILING_WHITESPACE
         )
     
    -    if(NOT MC_MYSQL_EMBEDDED_LIBRARIES OR NOT "${MC_return_embedded}" STREQUAL "0")
    -        # At least on OpenSUSE and FreeBSD --libmysql-libs doesn't exist, so we just use
    -        # MYSQL_LIBRARIES for that. We'll see if that's enough when testing
    -        # below.
    -        set(MYSQL_EMBEDDED_LIBRARIES ${MYSQL_LIBRARIES})
    -    else()
    -        set(MYSQL_EMBEDDED_LIBRARIES ${MC_MYSQL_EMBEDDED_LIBRARIES})
    -    endif()
    +    # mysql-config removed --libmysql-libs, but amarok need libmysqld other
    +    # than libmysqlclient to run mysql embedded server.
    +    find_library(MYSQL_EMBEDDED_LIBRARIES NAMES mysqld libmysqld
    +        PATHS
    +                $ENV{MYSQL_DIR}/libmysql_r/.libs
    +                $ENV{MYSQL_DIR}/lib
    +                $ENV{MYSQL_DIR}/lib/mysql
    +        PATH_SUFFIXES
    +                mysql
    +    )
     endif()
     
     # Try searching manually via find_path/find_library,  possibly with hints
  
  That of course will likely break things on other systems (in this form), so better don't incorporate it blindly... ;-)

REPOSITORY
  R181 Amarok

BRANCH
  mysqle-split-for-phab

REVISION DETAIL
  https://phabricator.kde.org/D28284

To: asturmlechner, #amarok, heikobecker, wbauer
Cc: amarok-devel, vmatare, mdn, pgomes, nicolamori, jyasi, mfraser, ryanmccoskrie, semareit, eridani, eoinoneill, jackyalcine, nhuisman, paul, domson, yaohanchen, malteveerman, markey, James, tbettler, Smar, ricktimmis, asturmlechner, schweingruber, heikobecker
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/amarok-devel/attachments/20200612/dfd6c269/attachment.htm>


More information about the Amarok-devel mailing list