I'm trying to use a flag, set from command line, such that when it is typed in, a pri file sets the variable to be used in another pri file. The pri that sets the variable is working fine, however when I try to access the variable from another pri where it actually needs to be used, I'm not getting any results.
So for instance in cmd
qmake (parameters) --variable_name
In parent.pri
contains(options, --variable_name) {
variable_name = true
message("variable_name = " $$variable_name)
}
output = variable_name = true
In child.pri
message("variable_name = " $$variable_name)
if(variable_name = true) {
// do stuff
}
else {
return(true)
}
output = variable_name =
I believe this is the right syntax, however in the child.pri when I try to echo the value set for variable_name nothing is displayed.
I could use contains(options, variable_name) { }
but I would like to only have to use this once in the parent.pri