[Development] Getting build flags for platforms without pkg-config
Konstantin Tokarev
annulen at yandex.ru
Mon Oct 30 23:09:30 CET 2017
31.10.2017, 01:03, "Konstantin Tokarev" <annulen at yandex.ru>:
> 31.10.2017, 00:56, "Thiago Macieira" <thiago.macieira at intel.com>:
>> 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
>
> Also there is a possibility that in future qmake will be removed, and there will
> be no more .pri files.
Oh, and I forgot to mention elephant in the room: .pri is not self contained, you also
need to parse .prl to get Libs.private
>
>> 2) the .pri file has the list of plugin types, to help static building and the
>> *deployqt tools.
>
> Missing information like this can be added to .pc as custom variables, which
> could be queried via pkg-config (or parsed directly from .pc).
>
>> $ 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
>>
>> _______________________________________________
>> Development mailing list
>> Development at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/development
>
> --
> Regards,
> Konstantin
> _______________________________________________
> 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