Re: [amarok] cmake/modules: Revert FindMySQLAmarok.cmake fix argumets when calling mysql_config

2011-12-18 Thread Matěj Laitl
On 18. 12. 2011 Christophe Giboudeaux wrote:
 Revert FindMySQLAmarok.cmake fix argumets when calling mysql_config
 This reverts a fix for -Wmissing-include-dirs warnings.
 MYSQL_INCLUDE_DIR must be a path and not contain -Ipath

Sorry about the incorrect fix, I will build with -Wmissing-include-dirs from 
now on. However I wonder how to fix the original problem.

Would it be legal to remove MYSQL_INCLUDE_DIR entirely and just rely on 
MYSQL_CFLAGS to specify -I/path/to/mysql ?

E.g. is cmake's include_directories(/dir) just a syntactic sugar for 
add_definitions(-I/dir) or it would break build on non-gcc platforms? I'd 
rather avoid filtering -I out of MYSQL_INCLUDE_DIR in CMakeLists.

Regards,
Matěj
___
Amarok-devel mailing list
Amarok-devel@kde.org
https://mail.kde.org/mailman/listinfo/amarok-devel


Re: Should we support building utilities without building player?

2011-12-18 Thread Stefan Derkits
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

On 12/19/2011 12:15 AM, Matěj Laitl wrote:
 I can do the b), but is there an actual use-case for building only
 utilities? Would linking to kdelibs hamper this use-case? (Paweł,
 Thomas?)

one use-case is/was to install a utillities package on a server
(without KDE/kdelibs installed), create (takes less time than via e.g.
NFS) a file with collection information via the collectionscanner
executable and import this file on your desktop.

No idea if many people use this anymore ... I used it from time to time.

Stefan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk7udSwACgkQlZvAMV/NgGKlLQCeL7JuBgC5dajWhyWuyQUgSXDP
r78An1F/Ofo/pHVNLtEqKFMmA3T7f+8o
=O7AI
-END PGP SIGNATURE-
___
Amarok-devel mailing list
Amarok-devel@kde.org
https://mail.kde.org/mailman/listinfo/amarok-devel


Re: [amarok] cmake/modules: Revert FindMySQLAmarok.cmake fix argumets when calling mysql_config

2011-12-18 Thread Matěj Laitl
On 19. 12. 2011 Christophe Giboudeaux wrote:
 On Sunday 18 December 2011 23:27:08 Matej Laitl wrote:
  Sorry about the incorrect fix, I will build with -Wmissing-include-dirs
  from now on. However I wonder how to fix the original problem.
 
 Your commit doesn't mention the issue you're trying to fix. However, having
 the same directory included several times is not an issue (and I'm not aware
 of any GCC flag that would throw a warning).

Ah, I tried to solve http://mail.kde.org/pipermail/amarok-devel/2011-
December/009663.html

Specifically, the problem is that mysql_config (since at least 5.1.56) doesn't 
accept --variable=pkgincludedir - it accepts only --include argument which 
returns something like -I/usr/include/mysql

-- Found MySQL: Usage: /usr/bin/mysql_config [OPTIONS]
Options:
--cflags [-I/usr/include/mysql -DHAVE_ERRNO_AS_DEFINE=1 -
DUNIV_LINUX -DUNIV_LINUX]
--include[-I/usr/include/mysql]
--libs   [-Wl,-O1 -Wl,--as-needed -rdynamic -L/usr/lib64/mysql 
-lmysqlclient -L/usr//lib64 -lz -lcrypt -lnsl -lm -L/usr/lib64/ -lssl -
lcrypto]
--libs_r [-Wl,-O1 -Wl,--as-needed -rdynamic -L/usr/lib64/mysql 
-lmysqlclient_r -L/usr//lib64 -lz -lpthread -lcrypt -lnsl -lm -lpthread -
L/usr/lib64/ -lssl -lcrypto]
--plugindir  [/usr/lib64/mysql/plugin]
--socket [/var/run/mysqld/mysqld.sock]
--port   [0]
--version[5.1.56]
--libmysqld-libs [-Wl,-O1 -Wl,--as-needed -rdynamic -L/usr/lib64/mysql 
-lmysqld -ldl -L/usr//lib64 -lz -lpthread -lcrypt -lnsl -lm -lpthread -lrt -
L/usr/lib64/ -lssl -lcrypto], -Wl,-O1 -Wl,--as-needed -rdynamic -
L/usr/lib64/mysql -lmysqlclient -L/usr//lib64 -lz -lcrypt -lnsl -lm -
L/usr/lib64/ -lssl -lcrypto

(they you get even longer and *nicer* -Wmissing-include-dirs warnings)

  Would it be legal to remove MYSQL_INCLUDE_DIR entirely and just rely on
  MYSQL_CFLAGS to specify -I/path/to/mysql ?
 
 Well, they don't have the same purpose. MYSQL_CFLAGS is used by the compiler
 (used in 'add_definitions..' lines) while MYSQL_INCLUDE_DIR is used by
 cmake.

...used by cmake (just?) to add -I/path to compiler arguments?

 Also, if mysql_config is not available, MYSQL_CFLAGS is empty and you can
 only count on MYSQL_INCLUDE_DIR.

Ah, I see.

  E.g. is cmake's include_directories(/dir) just a syntactic sugar for
  add_definitions(-I/dir) or it would break build on non-gcc platforms?
  I'd
  rather avoid filtering -I out of MYSQL_INCLUDE_DIR in CMakeLists.
 
 Without hint about what you're trying to fix, it's hard to answer this
 question.

So I guess we'll have to strip that -I out of `mysql_config --include`. Can we 
safely assume that it is only a single directory?

Regards,
Matěj
___
Amarok-devel mailing list
Amarok-devel@kde.org
https://mail.kde.org/mailman/listinfo/amarok-devel