[Interest] Qmake "requires" function

Carel Combrink carel.combrink at gmail.com
Mon Feb 22 11:44:30 CET 2016


Hi All,

What is the syntax for using the qmake "requires" function?

The documentation
<http://doc.qt.io/qt-5/qmake-test-function-reference.html#requires-condition>
states the following:
*Evaluates condition. If the condition is false, qmake skips this project
(and its SUBDIRS) when building.*

I want to use it to check if an environmental variable is set or not, if
possible. But I can not figure out how the command is used (even for a
basic test).

I have tested with the following but cant seem to get a positive result:

requires(true)

requires(false)

TEST_1=

requires(isEmpty(TEST_1))

requires(!isEmpty(TEST_1))

TEST_2="Test"

requires(isEmpty(TEST_2))

requires(!isEmpty(TEST_2))


requires(linux-g++)

requires(win32)


Any help will be appreciated, first of all of how the command should look
and secondly information or assistance to check if an environmental
variable is set for usage in the "requires" function.

Regards,
Carel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160222/75051498/attachment.html>


More information about the Interest mailing list