diff --git a/qtox.pro b/qtox.pro index 6fa31b7e0..d3864afa2 100644 --- a/qtox.pro +++ b/qtox.pro @@ -46,7 +46,9 @@ RESOURCES += res.qrc GIT_VERSION = $$system(git rev-parse HEAD 2> /dev/null || echo "built without git") DEFINES += GIT_VERSION=\"\\\"$$quote($$GIT_VERSION)\\\"\" -TIMESTAMP = $$system(date +"%s" || echo 0) +# date works on linux/mac, but it would hangs qmake on windows +# This hack returns 0 on batch (windows), but executes "date +%s" or return 0 if it fails on bash (linux/mac) +TIMESTAMP = $$system($1 2>null||echo 0||a;rm null;date +%s||echo 0) # I'm so sorry DEFINES += TIMESTAMP=$$TIMESTAMP DEFINES += LOG_TO_FILE