[Development] Getting build flags for platforms without pkg-config

Thiago Macieira thiago.macieira at intel.com
Sun Oct 29 23:57:47 CET 2017


On domingo, 29 de outubro de 2017 14:57:44 PDT Jeandet Alexis wrote:
> Hello,
> 
> Previously I asked about getting some defines from pkg-config, I pushed
> some code on gerrit to fix that.
> 
> Now I would like to care about platforms where we don't use pkg-config,
> at first I thought that we could get compile flags from qmake but it
> seems that no.

You can get them from either qmake or cmake. The flags are saved there.

You should also reconsider and install pkg-config on those platforms.

> Did I miss something?
> Would there be a way to get compile flags for a build system like
> meson?

Either write a .pro file that prints or saves the flags, or read the 
$$[QT_INSTALL_ARCHDATA]/mkspecs/modules/qt_lib_*.pri files.

Reading the files directly is officially looking into private API and we cannot 
promise you that it will continue working. But I don't see how to do it 
officially with qmake either.

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




More information about the Development mailing list