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

Konstantin Tokarev annulen at yandex.ru
Thu Oct 26 20:37:45 CEST 2017



26.10.2017, 20:20, "Jeandet Alexis" <alexis.jeandet at member.fsf.org>:
> 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 "
>
> So my questions are:
> 1) Is this normal/expected?
> 2) Why not providing this flags?

I think it would be correct to say that pkg-config support if a 3rd class citizen in Qt, after qmake and cmake
It's not even supported on all platforms, e.g. on Windows with MSVC, or macOS when frameworks are built (default mode).

> 3) Does a patch to provides this flags would be accepted?

Sure, if it is implemented in a way that Ossi approves.

>
> This would help to improve Qt support in Meson and I guess others build systems using pkgconfig.

It might be a better idea to support Qt without relying on pkg-config. Some 3rd party build systems do this, e.g. waf

>
> Best regards,
> Alexis.
>
> ,
>
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development


-- 
Regards,
Konstantin



More information about the Development mailing list