[Interest] Qmake "requires" function

Carel Combrink carel.combrink at gmail.com
Tue Feb 23 07:34:25 CET 2016


Thiago,

> MY_ENV_VAR_TEST=$$(MY_ENV_VAR)
> > isEmpty(MY_ENV_VAR_TEST) {
> >     error("The env var MY_ENV_VAR must be set when enabling this
> library")
> > }
> >
> > *PS: Is there a better way to check if an environmental variable is set
> > using qmake that is cross platform for Linux, Windows and Mac? *
>
> The above should work. If you were having problems, say what they were.


Thanks, no issue so far, just wanted to find out if there was another way.

requires() with a false predicate does not interrupt execution. It creates a
> Makefile that doesn't do anything.
>
> error() interrupts execution.
>

It makes sense, just not what I expected initially.

Thank you for the valued input.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160223/5d428442/attachment.html>


More information about the Interest mailing list