Since I'm using today's date for my application version, I'd be interested in filling it automatically.
Currently I'm doing the following in my project file:
VERSION = 15.4.20
But I'd like to make it automatic:
VERSION = $$YEAR.$$MONTH.$$DAY
Any idea?
Another option is to use undocumented qmake variable _DATE_, which is available on all platforms:
BUILD_YEAR = $$str_member($${_DATE_}, -4, -1)
message("Build year '$${BUILD_YEAR}' out of '$${_DATE_}'")
See Undocumented QMake
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With