From kde-core-devel Tue Aug 21 15:16:20 2007 From: Tobias Koenig Date: Tue, 21 Aug 2007 15:16:20 +0000 To: kde-core-devel Subject: Trouble with glib2, pkg-config and cmake under Debian Message-Id: <20070821151620.GA29915 () ghostdog ! localnet> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=118770929100659 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--UugvWAfsgieZRqgk" --UugvWAfsgieZRqgk Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, there is a problem with compiling glib2 dependend software with current Debian unstable and cmake. Let me explain the problem a bit closer. The current libglib2.0-dev package contains nearly all header files under /usr/include/glib-2.0/ but the file glibconfig.h is located under /usr/lib/glib-2.0/include. Unfortunately, some header files from /usr/include/glib-2.0/ include the glibconfig.h by '#include = '. So when you want to compile your software you have to add both path /usr/include/glib-2.0 _and_ /usr/lib/glib-2.0/include to the -I flag. Now pkg-config and cmakes enter the scene: The shipped glib-2.0.pc file contains the correct 'cflags' variable, which includes both pathes, however the 'includedir' variable contains only the /usr/include path... Our FindGLIB2.cmake module calls pkgconfig and queries for the 'includedir' variable instead of following the 'cflags' suggestion. =3D> the -I/usr/lib/glib-2.0/include is missing and the software doesn't compile. So where is the bug? Is it possible to define multiple pathes in the 'includedir' variable? Would cmake be able to handle multiple pathes there? Should FindGLIB2.cmake use the 'cflags' variable instead of the 'includedir'? Shall we ask the Debian maintainer to place the glibconfig.h to /usr/include? As a quick hack just symlink the glibconfig.h to /usr/include/glib-2.0/. Ciao, Tobias --=20 Separate politics from religion and economy! The Council of the European Union is an undemocratic and illegal institutio= n! --UugvWAfsgieZRqgk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFGywHESvFUKpY6VLARAlfZAJ4y+tmtrlUZCQnoHDOgpJrI1ZV5wQCgkkAx TdJwIx15ZeOZ0sgzcFfQZMI= =PbfG -----END PGP SIGNATURE----- --UugvWAfsgieZRqgk--