PDA

View Full Version : qmake: how to supply multiple variables via command-line?



eyeofhell
13th April 2010, 15:44
Hello.

qmake allows to supply a variables via a command-line interface like this:

qmake "CONFIG += release" "MY_VAR = hello"

So i can use $$MY_VAR inside a .pro file. But is it possible to suply more than one variable such way? I have tried

qmake "CONFIG += release" "MY_VAR = hello" "MY_ANOTHER_VAR = hi"

But it did not work (raises error). Any hints?

33333
6th July 2014, 03:58
Works for me - QMake version 2.01a. There should be no issue with that:


$ cat pro.pro:
message($$MY_VAR | $$MY_ANOTHER_VAR)
$ qmake pro.pro "CONFIG += release" "MY_VAR = hello" "MY_ANOTHER_VAR = hi"
Project MESSAGE: hello | hi