Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

qmake can't evaluate a proper variable

Tags:

qt

qmake

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

like image 978
argh Avatar asked Jan 25 '26 05:01

argh


1 Answers

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

like image 83
laalto Avatar answered Jan 28 '26 17:01

laalto



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!