[Interest] Qmake: Detecting if QSerialPort is installed
Thiago Macieira
thiago.macieira at intel.com
Thu Mar 10 14:48:11 CET 2016
On quinta-feira, 10 de março de 2016 09:10:49 PST André Hartmann wrote:
> Hi all,
>
> I'm working on a library that (optionally) depends on QSerialPort.
>
> This library should also compile on Qt 4, so I did the following in the
> project file:
>
> greaterThan(QT_MAJOR_VERSION, 4) {
> QT += serialport
> } else {
> CONFIG += serialport
> }
>
> Thats fine so far, but if QSerialPort is not installed for the
> corresponding Qt4 version, I'd like to get a message during the qmake run.
What happens if, instead of that CONFIG += serialport, you write:
load(serialport)
?
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Interest
mailing list