summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'BuildTools/SCons/Tools/BuildVersion.py')
-rw-r--r--BuildTools/SCons/Tools/BuildVersion.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/BuildTools/SCons/Tools/BuildVersion.py b/BuildTools/SCons/Tools/BuildVersion.py
new file mode 100644
index 0000000..530ef8a
--- /dev/null
+++ b/BuildTools/SCons/Tools/BuildVersion.py
@@ -0,0 +1,17 @@
+import SCons.Util
+
+import Version
+
+def generate(env) :
+ def createBuildVersion(env, target, version = None) :
+ buildVersion = """#pragma once
+
+static const char* buildVersion = \"%(buildVersion)s\";\n
+""" % { "buildVersion" : Version.getBuildVersion(version) }
+ env.WriteVal(target, env.Value(buildVersion))
+
+ env.AddMethod(createBuildVersion, "BuildVersion")
+
+
+def exists(env) :
+ return true