[Development] Getting defines from pkg-config for Qt modules

Thiago Macieira thiago.macieira at intel.com
Thu Oct 26 22:14:36 CEST 2017

On Thursday, 26 October 2017 10:09:49 PDT Jeandet Alexis wrote:
> Hello,
> I already asked this on IRC but I got no answer.
> On Fedora and Ubuntu I can say that "pkg-config --cflags Qt5[any
> module]" does only provides include flags and no defines such as
> As an example "pkg-config --cflags panelw" gives "-D_GNU_SOURCE

panelw.pc is buggy

However, we should have -DQT_CORE_LIB in Qt5Core.pc. Please file an issue for 

> So my questions are:
> 1) Is this normal/expected?
> 2) Why not providing this flags?
> 3) Does a patch to provides this flags would be accepted?

Yes, a patch adding QT_${uppercaselib}_LIB to each .pc would be accepted.

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

More information about the Development mailing list