On 19. 12. 2011 Christophe Giboudeaux wrote: > I see two solutions: > - only rely on find_path(MYSQL_INCLUDE_DIR...), so move it outside the > else(MYSQLCONFIG_EXECUTABLE) loop [1] > > - Drop FindMysqlAmarok.cmake and use FindAmarok.cmake from kdelibs instead > (which worked fine here). > > I prefer the second solution as the FindMysql from kdelibs is really cleaner > than the Amarok copy: > > - MYSQL_CFLAGS doesn't look that important > > - the linked targets gathered with 'mysql_config --libs' are already > explicitly added in the CMakeLists.txt files (./src/core- > impl/collections/db/sql/mysqlecollection/CMakeLists.txt, ./src/core- > impl/collections/db/sql/mysqlservercollection/CMakeLists.txt and some unit > tests) and the output variable is different if mysql_config is not present: > > * with mysql_config, MYSQL_LIBRARIES="-L/usr/lib64 -lmysqlclient -lpthread > - lz -lm -lrt -lssl -lcrypto -ldl" > * without it, MYSQL_LIBRARIES=/usr/lib64/libmysqlclient.so. The second one > is enough > > - the kdelibs FindAmarok has better chances to detect mysql.h under Windows, > - and it also uses a cleaner way to decide if mysqle is there.
I'd also like to drop FindMysqlAmarok.cmake entirely and use kdelibs one, code duplication is never good. Let's do it early in the 2.6 phase to get the most testing. Anyone opposed to me dropping FindMysqlAmarok.cmake in master for now? (can always be reverted if problems arise) Matěj Laitl _______________________________________________ Amarok-devel mailing list Amarok-devel@kde.org https://mail.kde.org/mailman/listinfo/amarok-devel