aboutsummaryrefslogtreecommitdiffstats
path: root/waflib/extras
diff options
context:
space:
mode:
Diffstat (limited to 'waflib/extras')
-rw-r--r--waflib/extras/autowaf.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/waflib/extras/autowaf.py b/waflib/extras/autowaf.py
index 57c0242..40d2373 100644
--- a/waflib/extras/autowaf.py
+++ b/waflib/extras/autowaf.py
@@ -11,7 +11,7 @@ import os
import subprocess
import sys
-from waflib import Build, Logs, Options, Utils
+from waflib import Build, Context, Logs, Options, Utils
from waflib.TaskGen import feature, before, after
global g_is_child
@@ -299,6 +299,11 @@ def configure(conf):
except:
pass # Test options do not exist
+ # Define version in configuration
+ appname = getattr(Context.g_module, Context.APPNAME, 'noname')
+ version = getattr(Context.g_module, Context.VERSION, '0.0.0')
+ define(conf, appname.upper() + '_VERSION', version)
+
conf.env.prepend_value('CFLAGS', '-I' + os.path.abspath('.'))
conf.env.prepend_value('CXXFLAGS', '-I' + os.path.abspath('.'))
g_step = 2