[Qt-interest] pkg-config and QtCore

Reece Dunn msclrhd at googlemail.com
Tue Jun 1 15:13:06 CEST 2010


On 1 June 2010 13:18,  <Oliver.Knoll at comit.ch> wrote:
> Stefanos Antaris wrote on Tuesday, June 01, 2010 1:35 PM:
>
>> I was just trying to built a program which needs pkg-config.Propably
>> i have made a mistake on Qt libraries and pkg-config cannot find
>> QtCore.
>
> I am not sure whether Qt itself generates a pkg-config entry for itself - are you sure this is supported? Such that you can build an application which requires Qt and use pkg-config to find the Qt installation (that is your scenario, if I understood you correctly)? I have never heard of that feature (which does not mean that it does not exist ;)

I am doing this in an application of mine using autoconf/automake:

    PKG_CONFIG(QtCore >= 4.6)

This works at least on Ubuntu 10.04 (or at least Qt 4.6) -- the files
are placed in the standard pkgconfig location.

NOTE: Have you installed the dev packages for QtCore, etc.? You need
these to put the pkgconfig files in the correct place.

I'm not sure if older Qt packages support this (i.e. I don't know when
this was added).

BTW: For the people who say that I should be using cmake for my
application, I don't want to or need to at this time. Also, this is
not the application that Stefanos is referring to, I am just sharing
my experiences of using Qt with pkg-config.

- Reece




More information about the Qt-interest-old mailing list