argh
argh

Reputation: 933

qmake can't evaluate a proper variable

I'd like to share my build version in the app but I can't get that thing to work... this is a part of my .pro file...

LITERAL_HASH = "foo";
BUILD = "$${LITERAL_HASH}{\"sexy Installer\"},(0x12345678),1,0,3";
DEPLOYMENT.installer_header = $$(BUILD);

message(bar .$$(BUILD).)

and when I run qmake from Qt menu the output is:

Project MESSAGE: bar ..

I'm doing everything according to the docs and still that variable seems to be empty...

Upvotes: 3

Views: 1260

Answers (1)

laalto
laalto

Reputation: 152817

Use $${BUILD} instead of $$(BUILD). The $() operator accesses environment variables, not .pro file variables.

Upvotes: 9

Related Questions