You've got three issues to address here. First is that you need to put that VERSION_NUMBER=$${VERSION}
assignment inside of quotes:
Add a define to qmake WITH a value?
The second is that it's not overly easy to get QMake to pass in a string literal #define
. A lot of ways will just interpret your numbers-separated-by-periods as a poorly formed numeric constant:
http://robertcarlsen.net/2009/01/06/qmake-xcode-bug-258
This might get you somewhere with the issue...works on my setup, although it's a triple-escaped headache:
VERSION = \\\"'0.9.9.0'\\\"
DEFINES += "VERSION_NUMBER=$${VERSION}"
Third problem--probably the biggest--is that you're using QMake, which is outdated, and the Trolltech/Nokia people know it:
http://labs.qt.nokia.com/2009/10/12/to-make-or-not-to-make-qmake-and-beyond/
You should switch to something else (like CMake...which supports Qt and is used by KDE).