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

Wolfgang Bauer noreply at phabricator.kde.org
Wed Jun 17 13:25:40 BST 2020


wbauer added inline comments.

INLINE COMMENTS

> wbauer wrote in FindMySQLe.cmake:45
> Right, that's exactly what I was referring to in my last comment, and what the openSUSE patch I mentioned (which originally was taken from Arch) is supposed to fix.
> 
> I.e. instead of `set(MYSQLE_LIBRARIES ${MYSQL_LIBRARIES})` here, it should do something like this:
> 
>   +    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
>   +    )
> 
> I'm undecided whether this should be done in this patch or rather separately though, as the problem did exist before (so it's actually an unrelated change).
> 
> Although, I just noticed that it actually does that below (in line#73ff) if `(NOT MYSQLE_LIBRARIES)`, so maybe it would just be enough to remove the  `set(MYSQLE_LIBRARIES ${MYSQL_LIBRARIES})` here completely?
> I'll give that a try...

> Although, I just noticed that it actually does that below (in line#73ff) if (NOT MYSQLE_LIBRARIES), so maybe it would just be enough to remove the set(MYSQLE_LIBRARIES ${MYSQL_LIBRARIES}) here completely?

Indeed, it works fine for me (without any additional patch) if I remove that `set (MYSQLE_LIBRARIES ${MYSQL_LIBRARIES})` line.

As this if branch is empty then (except for the comments, it would probably be more readable to remove the whole branch and invert the `if` condition.
Actually I think just `if ("${MC_return_embedded}" STREQUAL "0")` should be enough then, at least that works here on openSUSE too. And probably is more correct as well.

REPOSITORY
  R181 Amarok

BRANCH
  mysqle-split-for-phab

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

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


More information about the Amarok-devel mailing list