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

Kevin Funk kevin.funk at kdab.com
Tue Nov 28 07:13:27 CET 2017


On Thursday, 26 October 2017 22:25:19 CET Jeandet Alexis wrote:
> Hello Thiago,
> 
> Le jeudi 26 octobre 2017 à 13:14 -0700, Thiago Macieira a écrit :
> > 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
> > > -DQT_CORE_LIB or -DQT_GUI_LIB.
> > > 
> > > As an example "pkg-config --cflags panelw" gives "-D_GNU_SOURCE
> > > -D_DEFAULT_SOURCE "
> > 
> > panelw.pc is buggy
> 
> In fact I took the first one returning defines :)
> 
> > However, we should have -DQT_CORE_LIB in Qt5Core.pc. Please file an
> > issue for
> > us.
> > 
> > > 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.
> 
> Awesome, thank you.

For the record, this patch is at:
  https://codereview.qt-project.org/209717

Regards,
Kevin


-- 
Kevin Funk | kevin.funk at kdab.com | Senior Software Engineer
KDAB (Deutschland) GmbH, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt, C++ and OpenGL Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5322 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20171128/ca922056/attachment.bin>


More information about the Development mailing list