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

2017-10-31 Thread Konstantin Tokarev


30.10.2017, 22:11, "Thiago Macieira" :
> On segunda-feira, 30 de outubro de 2017 11:20:25 PDT Konstantin Tokarev wrote:
>>  > As for MSVC, the issue will be similar: teaching pkg-config about the MSVC
>>  > linker syntax. Hint: there's no -l
>>
>>  pkg-config knows nothing about nature of compiler flags, it can easily
>>  handle bundle-specific option or cl.exe argument
>
> It does, actually.
>
> For example, it suppresses -L that point to the system dirs, like -L/usr/lib.
> But it doesn't suppress -F options like that.
>
> It does deduplication for -I and -l options, but it doesn't for -framework or
> directly-named .lib files. Or for -I flags on Windows, for some reason.

Actually, on Windows pkg-config has --msvc-syntax that allows to use unix-style
flags in .pc files and convert them to cl.exe flags in the output.

https://cgit.freedesktop.org/pkg-config/tree/README.win32#n24

>
> It may be sufficient to get things going, but it's not a tool designed for 
> those
> environments.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
>
> ___
> Development mailing list
> Development@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development

-- 
Regards,
Konstantin
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


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

2017-10-30 Thread Thiago Macieira
On segunda-feira, 30 de outubro de 2017 15:03:33 PDT Konstantin Tokarev wrote:
> > 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.

Nothing is stopping us from keeping .pri files even after that.

> > 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).

Right.

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

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


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

2017-10-30 Thread Stephen Kelly
Thiago Macieira wrote:

> On segunda-feira, 30 de outubro de 2017 08:27:02 PDT Konstantin Tokarev
> wrote:
>> >>  $ cmake --find-package -DNAME=Qt5Core -DCOMPILER_ID=GNU
>> >>  -DLANGUAGE=CXX -DMODE=COMPILE
>> >>  -I/home/apol/devel/kde5/include/
>> >>  -I/home/apol/devel/kde5/include/QtCore
>> >>  -I/home/apol/devel/kde5/lib64//mkspecs/linux-g++
>> > 
>> > -DQT_CORE_LIB is missing. Any volunteers to add it to the cmake files?
>> 
>> It is already set:
> 
> If it's already set, why is it missing?
> 

The 

 cmake --find-package

option predates a lot of more-modern CMake stuff. In general I don't think 
cmake --find-package should be recommended.

Thanks,

Steve.


___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


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

2017-10-30 Thread Konstantin Tokarev


31.10.2017, 01:03, "Konstantin Tokarev" :
> 31.10.2017, 00:56, "Thiago Macieira" :
>>  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@qt-project.org
>>  http://lists.qt-project.org/mailman/listinfo/development
>
> --
> Regards,
> Konstantin
> ___
> Development mailing list
> Development@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development

-- 
Regards,
Konstantin
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


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

2017-10-30 Thread Konstantin Tokarev


31.10.2017, 00:56, "Thiago Macieira" :
> 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.

> 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@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development

-- 
Regards,
Konstantin
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


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

2017-10-30 Thread Thiago Macieira
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

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


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

2017-10-30 Thread jeandet
Le lundi 30 octobre 2017 à 19:11 +0300, Konstantin Tokarev a écrit :
> 
> 30.10.2017, 18:53, "Konstantin Tokarev" :
> > 30.10.2017, 18:43, "Thiago Macieira" :
> > >  On segunda-feira, 30 de outubro de 2017 08:27:02 PDT Konstantin
> > > Tokarev wrote:
> > > >   >> $ cmake --find-package -DNAME=Qt5Core -DCOMPILER_ID=GNU
> > > > -DLANGUAGE=CXX
> > > >   >> -DMODE=COMPILE
> > > >   >> -I/home/apol/devel/kde5/include/
> > > >   >> -I/home/apol/devel/kde5/include/QtCore
> > > >   >> -I/home/apol/devel/kde5/lib64//mkspecs/linux-g++
> > > >   >
> > > >   > -DQT_CORE_LIB is missing. Any volunteers to add it to the
> > > > cmake files?
> > > > 
> > > >   It is already set:
> > > 
> > >  If it's already set, why is it missing?
> > 
> > Apparently because cmake's imitation of pkg-config is half-assed.
> 
> So, it seems to me that the most reasonable way to support more build
> systems
> without duplicating data between them is to enhance pkg-config
> support. In fact,
> .pc files can be as rich as our .pri modules, containing extra data
> in custom
> variables, and build systems can rely on original pkg-config tool or
> parse .pc files
> directly (it's a simple declarative format, if variable substitutions
> are not used).
> 
> 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.
> 
> > 
> > >  --
> > >  Thiago Macieira - thiago.macieira (AT) intel.com
> > >Software Architect - Intel Open Source Technology Center
> > > 
> > >  ___
> > >  Development mailing list
> > >  Development@qt-project.org
> > >  http://lists.qt-project.org/mailman/listinfo/development
> > 
> > --
> > Regards,
> > Konstantin
> > ___
> > Development mailing list
> > Development@qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/development
> 
> 
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


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

2017-10-30 Thread Thiago Macieira
On segunda-feira, 30 de outubro de 2017 11:20:25 PDT Konstantin Tokarev wrote:
> > As for MSVC, the issue will be similar: teaching pkg-config about the MSVC
> > linker syntax. Hint: there's no -l
> 
> pkg-config knows nothing about nature of compiler flags, it can easily
> handle bundle-specific option or cl.exe argument

It does, actually.

For example, it suppresses -L that point to the system dirs, like -L/usr/lib. 
But it doesn't suppress -F options like that.

It does deduplication for -I and -l options, but it doesn't for -framework or 
directly-named .lib files. Or for -I flags on Windows, for some reason.

It may be sufficient to get things going, but it's not a tool designed for 
those 
environments.

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

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


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

2017-10-30 Thread Konstantin Tokarev


30.10.2017, 21:11, "Thiago Macieira" :
> On segunda-feira, 30 de outubro de 2017 09:11:39 PDT Konstantin Tokarev wrote:
>>  AFAIK there no technical reason why providing .pc files for MSVC and macOS
>>  frameworks would be impossible.
>
> It's a simple switch that needs to be toggled. In qt_module.prf:
>
> !internal_module:!lib_bundle:if(unix|mingw) {
> CONFIG += create_pc
>
> As you can see, they exist for macOS, except when we're building bundles. The
> problem there is teaching pkg-config about frameworks and bundles.
>
> As for MSVC, the issue will be similar: teaching pkg-config about the MSVC
> linker syntax. Hint: there's no -l

pkg-config knows nothing about nature of compiler flags, it can easily handle 
bundle-specific option or cl.exe argument

>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
>
> ___
> Development mailing list
> Development@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development

-- 
Regards,
Konstantin
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


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

2017-10-30 Thread Thiago Macieira
On segunda-feira, 30 de outubro de 2017 09:11:39 PDT Konstantin Tokarev wrote:
> AFAIK there no technical reason why providing .pc files for MSVC and macOS
> frameworks would be impossible.

It's a simple switch that needs to be toggled. In qt_module.prf:

!internal_module:!lib_bundle:if(unix|mingw) {
CONFIG += create_pc

As you can see, they exist for macOS, except when we're building bundles. The 
problem there is teaching pkg-config about frameworks and bundles.

As for MSVC, the issue will be similar: teaching pkg-config about the MSVC 
linker syntax. Hint: there's no -l

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

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


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

2017-10-30 Thread Jake Petroules


> On Oct 30, 2017, at 9:11 AM, Konstantin Tokarev  wrote:
> 
> 
> 
> 30.10.2017, 18:53, "Konstantin Tokarev" :
>> 30.10.2017, 18:43, "Thiago Macieira" :
>>>  On segunda-feira, 30 de outubro de 2017 08:27:02 PDT Konstantin Tokarev 
>>> wrote:
   >> $ cmake --find-package -DNAME=Qt5Core -DCOMPILER_ID=GNU -DLANGUAGE=CXX
   >> -DMODE=COMPILE
   >> -I/home/apol/devel/kde5/include/
   >> -I/home/apol/devel/kde5/include/QtCore
   >> -I/home/apol/devel/kde5/lib64//mkspecs/linux-g++
   >
   > -DQT_CORE_LIB is missing. Any volunteers to add it to the cmake files?
 
   It is already set:
>>> 
>>>  If it's already set, why is it missing?
>> 
>> Apparently because cmake's imitation of pkg-config is half-assed.
> 
> So, it seems to me that the most reasonable way to support more build systems
> without duplicating data between them is to enhance pkg-config support. In 
> fact,
> .pc files can be as rich as our .pri modules, containing extra data in custom
> variables, and build systems can rely on original pkg-config tool or parse 
> .pc files
> directly (it's a simple declarative format, if variable substitutions are not 
> used).
> 
> AFAIK there no technical reason why providing .pc files for MSVC and macOS
> frameworks would be impossible.

Providing pkg-config files for Qt modules is something that's high on our list 
for the Qbs port of Qt; it's currently being worked on.

>> 
>>>  --
>>>  Thiago Macieira - thiago.macieira (AT) intel.com
>>>Software Architect - Intel Open Source Technology Center
>>> 
>>>  ___
>>>  Development mailing list
>>>  Development@qt-project.org
>>>  http://lists.qt-project.org/mailman/listinfo/development
>> 
>> --
>> Regards,
>> Konstantin
>> ___
>> Development mailing list
>> Development@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/development
> 
> -- 
> Regards,
> Konstantin
> ___
> Development mailing list
> Development@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development

-- 
Jake Petroules - jake.petrou...@qt.io
The Qt Company - Silicon Valley
Qbs build tool evangelist - qbs.io

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


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

2017-10-30 Thread Konstantin Tokarev


30.10.2017, 18:53, "Konstantin Tokarev" :
> 30.10.2017, 18:43, "Thiago Macieira" :
>>  On segunda-feira, 30 de outubro de 2017 08:27:02 PDT Konstantin Tokarev 
>> wrote:
>>>   >> $ cmake --find-package -DNAME=Qt5Core -DCOMPILER_ID=GNU -DLANGUAGE=CXX
>>>   >> -DMODE=COMPILE
>>>   >> -I/home/apol/devel/kde5/include/
>>>   >> -I/home/apol/devel/kde5/include/QtCore
>>>   >> -I/home/apol/devel/kde5/lib64//mkspecs/linux-g++
>>>   >
>>>   > -DQT_CORE_LIB is missing. Any volunteers to add it to the cmake files?
>>>
>>>   It is already set:
>>
>>  If it's already set, why is it missing?
>
> Apparently because cmake's imitation of pkg-config is half-assed.

So, it seems to me that the most reasonable way to support more build systems
without duplicating data between them is to enhance pkg-config support. In fact,
.pc files can be as rich as our .pri modules, containing extra data in custom
variables, and build systems can rely on original pkg-config tool or parse .pc 
files
directly (it's a simple declarative format, if variable substitutions are not 
used).

AFAIK there no technical reason why providing .pc files for MSVC and macOS
frameworks would be impossible.

>
>>  --
>>  Thiago Macieira - thiago.macieira (AT) intel.com
>>    Software Architect - Intel Open Source Technology Center
>>
>>  ___
>>  Development mailing list
>>  Development@qt-project.org
>>  http://lists.qt-project.org/mailman/listinfo/development
>
> --
> Regards,
> Konstantin
> ___
> Development mailing list
> Development@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development

-- 
Regards,
Konstantin
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


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

2017-10-30 Thread Konstantin Tokarev


30.10.2017, 18:43, "Thiago Macieira" :
> On segunda-feira, 30 de outubro de 2017 08:27:02 PDT Konstantin Tokarev wrote:
>>  >> $ cmake --find-package -DNAME=Qt5Core -DCOMPILER_ID=GNU -DLANGUAGE=CXX
>>  >> -DMODE=COMPILE
>>  >> -I/home/apol/devel/kde5/include/
>>  >> -I/home/apol/devel/kde5/include/QtCore
>>  >> -I/home/apol/devel/kde5/lib64//mkspecs/linux-g++
>>  >
>>  > -DQT_CORE_LIB is missing. Any volunteers to add it to the cmake files?
>>
>>  It is already set:
>
> If it's already set, why is it missing?

Apparently because cmake's imitation of pkg-config is half-assed.

>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
>
> ___
> Development mailing list
> Development@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development

-- 
Regards,
Konstantin
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


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

2017-10-30 Thread Thiago Macieira
On segunda-feira, 30 de outubro de 2017 08:27:02 PDT Konstantin Tokarev wrote:
> >>  $ cmake --find-package -DNAME=Qt5Core -DCOMPILER_ID=GNU -DLANGUAGE=CXX
> >>  -DMODE=COMPILE
> >>  -I/home/apol/devel/kde5/include/
> >>  -I/home/apol/devel/kde5/include/QtCore
> >>  -I/home/apol/devel/kde5/lib64//mkspecs/linux-g++
> > 
> > -DQT_CORE_LIB is missing. Any volunteers to add it to the cmake files?
> 
> It is already set:

If it's already set, why is it missing?

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

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


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

2017-10-30 Thread Konstantin Tokarev


30.10.2017, 18:23, "Thiago Macieira" :
> On segunda-feira, 30 de outubro de 2017 05:22:00 PDT Aleix Pol wrote:
>>  $ cmake --find-package -DNAME=Qt5Core -DCOMPILER_ID=GNU -DLANGUAGE=CXX
>>  -DMODE=COMPILE
>>  -I/home/apol/devel/kde5/include/
>>  -I/home/apol/devel/kde5/include/QtCore
>>  -I/home/apol/devel/kde5/lib64//mkspecs/linux-g++
>
> -DQT_CORE_LIB is missing. Any volunteers to add it to the cmake files?

It is already set:

set(Qt5Core_DEFINITIONS -DQT_CORE_LIB)
set(Qt5Core_COMPILE_DEFINITIONS QT_CORE_LIB)
...
set_property(TARGET Qt5::Core PROPERTY
  INTERFACE_COMPILE_DEFINITIONS QT_CORE_LIB)


>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
>
> ___
> Development mailing list
> Development@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development

-- 
Regards,
Konstantin
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


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

2017-10-30 Thread Thiago Macieira
On segunda-feira, 30 de outubro de 2017 05:22:00 PDT Aleix Pol wrote:
> $ cmake --find-package -DNAME=Qt5Core -DCOMPILER_ID=GNU -DLANGUAGE=CXX
> -DMODE=COMPILE
> -I/home/apol/devel/kde5/include/
> -I/home/apol/devel/kde5/include/QtCore
> -I/home/apol/devel/kde5/lib64//mkspecs/linux-g++

-DQT_CORE_LIB is missing. Any volunteers to add it to the cmake files?

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

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


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

2017-10-30 Thread Aleix Pol
On Mon, Oct 30, 2017 at 9:00 AM, Jeandet Alexis
 wrote:
> Le dimanche 29 octobre 2017 à 15:57 -0700, Thiago Macieira a écrit :
>> 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.
> I was affraid I would get this answer. How do you solve this issue with
> QBS? Does qmake generate files for QBS on each Qt version or do you
> hardcode stuff in QBS?
> This leads me to the conclusion that a kind of qt-pkg-config tool would
> be nice. Or just expending qmake to provide this infromations.
>>
> ___
> Development mailing list
> Development@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development

You should also be able to use cmake with --find-package. This is what
it looks like on my system:

$ cmake --find-package -DNAME=Qt5Core -DCOMPILER_ID=GNU -DLANGUAGE=CXX
-DMODE=LINK
-Wl,-rpath,/home/apol/devel/kde5/lib
/home/apol/devel/kde5/lib/libQt5Core.so.5.10.0
$ cmake --find-package -DNAME=Qt5Core -DCOMPILER_ID=GNU -DLANGUAGE=CXX
-DMODE=COMPILE
-I/home/apol/devel/kde5/include/
-I/home/apol/devel/kde5/include/QtCore
-I/home/apol/devel/kde5/lib64//mkspecs/linux-g++

Aleix
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


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

2017-10-30 Thread Christian Kandeler
On Mon, 30 Oct 2017 09:00:46 +0100
Jeandet Alexis  wrote:

> Le dimanche 29 octobre 2017 à 15:57 -0700, Thiago Macieira a écrit :
> > 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.  
> I was affraid I would get this answer. How do you solve this issue with
> QBS? Does qmake generate files for QBS on each Qt version or do you
> hardcode stuff in QBS? 

Neither. At the moment, qbs simply parses the module .pri files. The proper 
solution would be to provide qbs module files with Qt.


Christian
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


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

2017-10-29 Thread Thiago Macieira
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

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development