summaryrefslogtreecommitdiff
path: root/version.pri
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2012-01-04 22:07:32 (GMT)
committerMarius Kintel <marius@kintel.net>2012-01-04 22:07:32 (GMT)
commitfdce8d15fc4a927d1a6a257783dde5054d9f3e7b (patch)
tree6a779b50ef65474af9c539ad7d42268f7e760ae8 /version.pri
parentcbabbaed700536b3a1f513fd5a07d25382cb137f (diff)
parentba8aa515d14cf270c9d0fdf50b4c7c55b3c416a8 (diff)
Merge branch 'master' into boost_filesystem
Conflicts: boost.pri src/lexer.l tests/CMakeLists.txt
Diffstat (limited to 'version.pri')
-rw-r--r--version.pri21
1 files changed, 11 insertions, 10 deletions
diff --git a/version.pri b/version.pri
index c94ab82..6b91ecd 100644
--- a/version.pri
+++ b/version.pri
@@ -1,7 +1,7 @@
# get VERSION from system date
isEmpty(VERSION) {
- win32-msvc*: {
+ win32-msvc*:!mingw-cross-env {
#
# Windows XP date command only has one argument, /t
# and it can print the date in various localized formats.
@@ -51,17 +51,18 @@ isEmpty(VERSION) {
} else {
# Unix/Mac
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)
}
- # Fix for problem with integers with leading zeros
- # being interpreted by C++ as octals. Now they're doubles.
- VERSION_YEAR=$${VERSION_YEAR}.0
- VERSION_MONTH=$${VERSION_MONTH}.0
- VERSION_DAY=$${VERSION_DAY}.0
}
+VERSION_SPLIT=$$split(VERSION, ".")
+VERSION_YEAR=$$member(VERSION_SPLIT, 0)
+VERSION_MONTH=$$member(VERSION_SPLIT, 1)
+VERSION_DAY=$$member(VERSION_SPLIT, 2)
+# Fix for problem with integers with leading zeros
+# being interpreted by C++ as octals. Now they're doubles.
+VERSION_YEAR=$${VERSION_YEAR}.0
+VERSION_MONTH=$${VERSION_MONTH}.0
+VERSION_DAY=$${VERSION_DAY}.0
+
DEFINES += OPENSCAD_VERSION=$$VERSION OPENSCAD_YEAR=$$VERSION_YEAR OPENSCAD_MONTH=$$VERSION_MONTH
!isEmpty(VERSION_DAY): DEFINES += OPENSCAD_DAY=$$VERSION_DAY
contact: Jan Huwald // Impressum