I'm trying to get the build date and time into my application so I can display in the about page.
In my pro file I have:
DEFINES += "BUILDDATE=$$system(date +'%d-%m-%y %T')"
I've tried the date command with the format in a terminal on the system and it works fine.
In my source:
QString strBldDate(BUILDDATE);
This all builds without error, when I check in the debugger, strBldDate is empty.
From discussions I've been told I can use message() in the ".pro" file to show for example:
message($$system(date +"'%d-%m-%y %T'"))
This works and when I build I get something like:
Project MESSAGE: 26-06-19 10:34:59
But how can I use the same to validate the contents of a definition?
message(BUILDDATE)
After my above efforts just results in:
Project MESSAGE: BUILDDATE