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

Thiago Macieira thiago.macieira at intel.com
Mon Oct 30 22:56:24 CET 2017


On segunda-feira, 30 de outubro de 2017 09:46:42 PDT jeandet wrote:
> > AFAIK there no technical reason why providing .pc files for MSVC and
> > macOS
> > frameworks would be impossible.
> 
> I agree, I would add that and even without pkg-config parsing pc files
> seems more reasonable than parsing pri files.

I don't see how one is more difficult than the other, technically speaking. 
They're both just a bunch of assignments, though the .pri file seems to depend 
on some variables not defined in the file, but which can be easily inferred.

The two important details, though:
1) pkg-config is a standardised file format, the .pri isn't
2) the .pri file has the list of plugin types, to help static building and the 
*deployqt tools.

$ cat mkspecs/modules/qt_lib_network.pri lib/pkgconfig/Qt5Network.pc
QT.network.VERSION = 5.10.0
QT.network.name = QtNetwork
QT.network.module = Qt5Network.t
QT.network.libs = $$QT_MODULE_LIB_BASE
QT.network.includes = $$QT_MODULE_INCLUDE_BASE $$QT_MODULE_INCLUDE_BASE/
QtNetwork
QT.network.frameworks =
QT.network.bins = $$QT_MODULE_BIN_BASE
QT.network.plugin_types = bearer
QT.network.depends = core
QT.network.uses =
QT.network.module_config = v2
QT.network.DEFINES = QT_NETWORK_LIB
QT.network.enabled_features = networkinterface bearermanagement ftp http 
localserver networkdiskcache networkproxy sctp socks5 ssl udpsocket
QT.network.disabled_features = opensslv11
QT_CONFIG += networkinterface bearermanagement ftp getifaddrs http ipv6ifname 
localserver networkdiskcache networkproxy sctp socks5 ssl udpsocket
QT_MODULES += network
prefix=/home/tjmaciei/obj/qt/qt5/qtbase
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include


Name: Qt5 Network
Description: Qt Network module
Version: 5.10.0
Libs: -L${libdir} -lQt5Network.t 
Cflags: -I${includedir}/QtNetwork -I${includedir}
Requires: Qt5Core

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




More information about the Development mailing list