summaryrefslogtreecommitdiff
path: root/openscad.pro
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-10-03 22:09:04 (GMT)
committerMarius Kintel <marius@kintel.net>2011-10-03 22:09:04 (GMT)
commit2f239205a8f46cf00dfd461a72909867fa4aca80 (patch)
tree930bf143a8e341df817e321a7f891300a053b5aa /openscad.pro
parent4432eb78aa5fc46a746893f8bdfe4f62f83e61a4 (diff)
Redefined version() to return the version as a vector. Added version_num() to return a comparable number
Diffstat (limited to 'openscad.pro')
-rw-r--r--openscad.pro7
1 files changed, 6 insertions, 1 deletions
diff --git a/openscad.pro b/openscad.pro
index 271c34d..3a41800 100644
--- a/openscad.pro
+++ b/openscad.pro
@@ -13,6 +13,10 @@ win32 {
} else {
isEmpty(VERSION) VERSION = $$system(date "+%Y.%m.%d")
}
+VERSION_SPLIT=$$split(VERSION, ".")
+VERSION_YEAR=$$member(VERSION_SPLIT, 0)
+VERSION_MONTH=$$member(VERSION_SPLIT, 1)
+VERSION_DAY=$$member(VERSION_SPLIT, 2)
#configure lex / yacc
win32 {
@@ -31,7 +35,8 @@ win32 {
INCLUDEPATH += $$(MPFRDIR)
}
-DEFINES += OPENSCAD_VERSION=$$VERSION
+DEFINES += OPENSCAD_VERSION=$$VERSION OPENSCAD_YEAR=$$VERSION_YEAR OPENSCAD_MONTH=$$VERSION_MONTH
+!isEmpty(VERSION_DAY): DEFINES += OPENSCAD_DAY=$$VERSION_DAY
win32:DEFINES += _USE_MATH_DEFINES NOMINMAX _CRT_SECURE_NO_WARNINGS YY_NO_UNISTD_H
#disable warning about too long decorated names
contact: Jan Huwald // Impressum