meson: Cleanup and fix warnings
This commit is contained in:
parent
49e595cda2
commit
73a1702c47
2 changed files with 21 additions and 11 deletions
|
|
@ -24,7 +24,7 @@ version_suffix = ''
|
||||||
|
|
||||||
if get_option('profile') == 'development'
|
if get_option('profile') == 'development'
|
||||||
profile = '.Devel'
|
profile = '.Devel'
|
||||||
vcs_tag = run_command('git', 'rev-parse', '--short', 'HEAD').stdout().strip()
|
vcs_tag = run_command('git', 'rev-parse', '--short', 'HEAD', check: false).stdout().strip()
|
||||||
if vcs_tag == ''
|
if vcs_tag == ''
|
||||||
version_suffix = '-devel'
|
version_suffix = '-devel'
|
||||||
else
|
else
|
||||||
|
|
@ -56,7 +56,7 @@ subdir('po')
|
||||||
# Pre-commit hook for rust formatting
|
# Pre-commit hook for rust formatting
|
||||||
if get_option('profile') == 'development'
|
if get_option('profile') == 'development'
|
||||||
message('Setting up git pre-commit hook..')
|
message('Setting up git pre-commit hook..')
|
||||||
run_command('cp', '-f', 'hooks/pre-commit.hook', '.git/hooks/pre-commit')
|
run_command('cp', '-f', 'hooks/pre-commit.hook', '.git/hooks/pre-commit', check: false)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
gnome.post_install(
|
gnome.post_install(
|
||||||
|
|
|
||||||
|
|
@ -27,22 +27,32 @@ else
|
||||||
message('Building in debug mode')
|
message('Building in debug mode')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
cargo_env = [ 'CARGO_HOME=' + build_root / 'cargo-home' ]
|
cargo_env = { 'CARGO_HOME': build_root / 'cargo-home' }
|
||||||
|
|
||||||
cargo_release = custom_target(
|
cargo_build = custom_target(
|
||||||
'cargo-build',
|
'cargo-build',
|
||||||
build_by_default: true,
|
build_by_default: true,
|
||||||
build_always_stale: true,
|
build_always_stale: true,
|
||||||
output: meson.project_name(),
|
output: 'src',
|
||||||
console: true,
|
console: true,
|
||||||
install: true,
|
env: cargo_env,
|
||||||
install_dir: get_option('bindir'),
|
|
||||||
command: [
|
command: [
|
||||||
'env',
|
|
||||||
cargo_env,
|
|
||||||
cargo, 'build',
|
cargo, 'build',
|
||||||
cargo_options,
|
cargo_options,
|
||||||
'&&',
|
|
||||||
'cp', 'src' / rust_target / meson.project_name(), '@OUTPUT@',
|
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
copy_binary = custom_target(
|
||||||
|
'cp-binary',
|
||||||
|
depends: cargo_build,
|
||||||
|
build_by_default: true,
|
||||||
|
build_always_stale: true,
|
||||||
|
install: true,
|
||||||
|
install_dir: get_option('bindir'),
|
||||||
|
output: meson.project_name(),
|
||||||
|
command: [
|
||||||
|
'cp',
|
||||||
|
'src' / rust_target / meson.project_name(),
|
||||||
|
'@OUTPUT@',
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue