diff options
author | Dylan Baker <[email protected]> | 2017-11-01 11:54:10 -0700 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2017-11-09 11:19:53 -0800 |
commit | 3e9533d9b88d75d99632fa40e38cfed842d10842 (patch) | |
tree | 6f7a1f9f6e94d557938c8385c2fa2f0390d7fb0a /meson.build | |
parent | 359a8f6ae5a2e33ffd8dd2a06883fad83e7e09c9 (diff) |
meson: Add script to use VERSION file for getting version
Meson has up until this point set it's version in the root meson.build
script, while the other build systems read the VERSION file. This is
just "one more thing" to duplicate between meson and every other build
system. This script is a simple "read, strip, print" sort of deal to
allow meson to read the VERSION file.
I chose to implement this in python since python is portable, and to
keep the meson.build script clean. This is also complicated by the fact
that the project() call *must* be the first non-comment,non-blank in the
toplevel meson.build script.
v2: - Move from scripts/ to bin/
- use python explicitly to run the scripts to support windows
Signed-off-by: Dylan Baker <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meson.build b/meson.build index ddd76804c54..51d19c02b80 100644 --- a/meson.build +++ b/meson.build @@ -21,7 +21,9 @@ project( 'mesa', ['c', 'cpp'], - version : '17.3.0-devel', + version : run_command( + [find_program('python', 'python2', 'python3'), 'bin/meson_get_version.py'] + ).stdout(), license : 'MIT', meson_version : '>= 0.42', default_options : ['buildtype=debugoptimized', 'c_std=c99', 'cpp_std=c++11'] |