Hi, I'm trying to figure something out and have looked everywhere but don't see it referred to, or admittedly I could be using the wrong search term.
I want to set a variable that is to be used by both qmake and my program. So far I have only figured out that I could put that variable in both my .pro file and my .h file, the first for qmake, and the second for my program's use. Is there either a way for my program to use variables set in the pro file(s), or if no such thing exists, is there a way for me to generate, on the fly, an automatically created header file that will be created with that variable/value as a #define? If I could do the first I would be very happy, but I would be gratified to hear that I could at least do the second.
I was looking around and found that I can call qmake -set <variable> <value>, and I got really excited that I had found the thing. The web page even said that QSettings::value("<variable>") would be used to get the value, but I am now of the impression that's only for setting a global variable for the current environment, and not one to be passed in to the settings for my program. Also, that would be a command line thing that would be done separate to a regular qmake call that created Makefiles.
Does anyone have any suggestions for me to not have to create two instances of the same variable in two different files, a pro file and a h file?
Thanks...
Bookmarks