Make sway-version overrideable again

This commit is contained in:
Birger Schacht 2019-02-13 12:35:18 +01:00
parent 98b40d31c1
commit e099f7870d
2 changed files with 5 additions and 1 deletions

View file

@ -128,7 +128,10 @@ endif
add_project_arguments('-DSYSCONFDIR="/@0@"'.format(join_paths(prefix, sysconfdir)), language : 'c') add_project_arguments('-DSYSCONFDIR="/@0@"'.format(join_paths(prefix, sysconfdir)), language : 'c')
version = '"@0@"'.format(meson.project_version()) version = get_option('sway-version')
if version == ''
version = '"@0@"'.format(meson.project_version())
endif
if git.found() if git.found()
git_commit_hash = run_command([git.path(), 'describe', '--always', '--tags']) git_commit_hash = run_command([git.path(), 'describe', '--always', '--tags'])
git_branch = run_command([git.path(), 'rev-parse', '--abbrev-ref', 'HEAD']) git_branch = run_command([git.path(), 'rev-parse', '--abbrev-ref', 'HEAD'])

View file

@ -1,3 +1,4 @@
option('sway-version', type: 'string', description: 'The version string reported in `sway --version`.')
option('default-wallpaper', type: 'boolean', value: true, description: 'Install the default wallpaper.') option('default-wallpaper', type: 'boolean', value: true, description: 'Install the default wallpaper.')
option('zsh-completions', type: 'boolean', value: true, description: 'Install zsh shell completions.') option('zsh-completions', type: 'boolean', value: true, description: 'Install zsh shell completions.')
option('bash-completions', type: 'boolean', value: true, description: 'Install bash shell completions.') option('bash-completions', type: 'boolean', value: true, description: 'Install bash shell completions.')