pkgconfig under Windows ? Was: review FindBlueZ.cmake

Ralf Habacker ralf.habacker at freenet.de
Sun Oct 2 12:28:29 UTC 2011


Am 02.10.2011 00:17, schrieb Pedro Lopez-Cabanillas:
> On Saturday 01 October 2011, Patrick Spendrin wrote:
>> The issue with pkgconfig and also the point why we don't use it is the
>> following: pkgconfig uses .pc files to find out about the layout of a
>> library. This means that e.g. the installation path is hardcoded into
>> that file, which makes sense as long as you don't send around packages
>> containing these files: on a different system those paths will not have
>> any meaning, so it is completely useless to put those paths in there.
> The hardcoded path in the .pc file is interpreted (in Windows) relative to the
> directory where the .pc file was found. It is explained in the man page:
> http://linux.die.net/man/1/pkg-config
>
> "Windows Specialities
>
> If a .pc file is found in a directory that matches the usual conventions
> (i.e., ends with \lib\pkgconfig), the prefix for that package is assumed to be
> the grandparent of the directory where the file was found, and the prefix
> variable is overridden for that file accordingly.
>
> In addition to the PKG_CONFIG_PATH environment variable, the Registry keys
> HKEY_CURRENT_USER\Software\pkgconfig\PKG_CONFIG_PATH and
> HKEY_LOCAL_MACHINE\Software\pkgconfig\PKG_CONFIG_PATH can be used to specify
> directories to search for .pc files. Each (string) value in these keys is
> treated as a directory where to look for .pc files."
Below is the list of packages  of the kde 4.7.0 vc100 release with a 
pkgconfig file

c:\Program Files\kde-4.7.0-vc100\lib\pkgconfig/dbusmenu-qt.pc
c:\Program Files\kde-4.7.0-vc100\lib\pkgconfig/libpng.pc
c:\Program Files\kde-4.7.0-vc100\lib\pkgconfig/libpng14.pc
c:\Program Files\kde-4.7.0-vc100\lib\pkgconfig/libssh.pc
c:\Program Files\kde-4.7.0-vc100\lib\pkgconfig/taglib_c.pc
c:\Program Files\kde-4.7.0-vc100\lib\pkgconfig/zlib.pc

The contents are:

c:\Program Files\kde-4.7.0-vc100\lib\pkgconfig/dbusmenu-qt.pc
prefix=n:/
exec_prefix=n:/
libdir=n://lib
includedir=n://include/dbusmenu-qt

Name: libdbusmenu-qt
Description: Qt implementation of dbusmenu spec
Version: 0.8.3
Libs: -L${libdir} -ldbusmenu-qt
Cflags: -I${includedir}

c:\Program Files\kde-4.7.0-vc100\lib\pkgconfig/libpng.pc
prefix=k:/
exec_prefix=k:/
libdir=k://lib
includedir=k://include/libpng14

Name: libpng
Description: Loads and saves PNG files

c:\Program Files\kde-4.7.0-vc100\lib\pkgconfig/libpng14.pc
Version: 1.4.4
Libs: -L${libdir} -lpng14
Libs.private: -lz -lm
Cflags: -I${includedir}
prefix=k:/
exec_prefix=k:/
libdir=k://lib
includedir=k://include/libpng14

Name: libpng
Description: Loads and saves PNG files

c:\Program Files\kde-4.7.0-vc100\lib\pkgconfig/libssh.pc
Version: 1.4.4
Libs: -L${libdir} -lpng14
Libs.private: -lz -lm
Cflags: -I${includedir}
Name: libssh
Description: The SSH Library

c:\Program Files\kde-4.7.0-vc100\lib\pkgconfig/taglib_c.pc
Version: 0.5.0
Libs: -Llib -lssh
Cflags: -Iinclude

prefix=k:/
exec_prefix=k:/
libdir=k:/lib
includedir=k:/include


Name: TagLib C Bindings
Description: Audio meta-data library (C bindings)
Requires: taglib
Version: 1.7.0
Libs: -Lk:/lib -ltag_c
Cflags: -Ik:/include/taglib

c:\Program Files\kde-4.7.0-vc100\lib\pkgconfig/zlib.pc
prefix=k:/
exec_prefix=k:/
libdir=k://lib
sharedlibdir=k://lib
includedir=k://include

Name: zlib
Description: zlib compression library
Version: 1.2.5

Requires:
Libs: -L -L -lz
Cflags: -I

How could the pathes of these file be interpreted relative to the 
install root ?

Ralf



More information about the Kde-windows mailing list