meson: Cleanups
This commit is contained in:
parent
895babbe82
commit
9b56f30c3b
2 changed files with 15 additions and 28 deletions
11
meson.build
11
meson.build
|
|
@ -47,11 +47,6 @@ base_id = 'org.gnome.Loupe'
|
|||
app_id = 'org.gnome.Loupe@0@'.format(profile)
|
||||
iv_version = meson.project_version() + version_suffix
|
||||
|
||||
cargo_sources = files(
|
||||
'Cargo.lock',
|
||||
'Cargo.toml',
|
||||
)
|
||||
|
||||
conf = configuration_data()
|
||||
conf.set('APP_ID', app_id)
|
||||
conf.set('PROFILE', profile)
|
||||
|
|
@ -66,12 +61,6 @@ subdir('help')
|
|||
subdir('src')
|
||||
subdir('po')
|
||||
|
||||
# Pre-commit hook for rust formatting
|
||||
if get_option('profile') == 'development'
|
||||
message('Setting up git pre-commit hook..')
|
||||
run_command('cp', '-f', 'hooks/pre-commit.hook', '.git/hooks/pre-commit', check: false)
|
||||
endif
|
||||
|
||||
gnome.post_install(
|
||||
gtk_update_icon_cache: true,
|
||||
update_desktop_database: true,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
configure_file(
|
||||
input: 'config.rs.in',
|
||||
output: 'config.rs',
|
||||
configuration: conf
|
||||
)
|
||||
configure_file(input: 'config.rs.in', output: 'config.rs', configuration: conf)
|
||||
|
||||
build_root = meson.project_build_root()
|
||||
source_root = meson.project_source_root()
|
||||
|
|
@ -12,7 +8,7 @@ run_command(
|
|||
'cp',
|
||||
build_root / 'src' / 'config.rs',
|
||||
source_root / 'src' / 'config.rs',
|
||||
check: true
|
||||
check: true,
|
||||
)
|
||||
|
||||
cargo_options = ['--manifest-path', source_root / 'Cargo.toml']
|
||||
|
|
@ -41,12 +37,13 @@ cargo_build = custom_target(
|
|||
console: true,
|
||||
env: cargo_env,
|
||||
command: [
|
||||
cargo, 'build',
|
||||
cargo,
|
||||
'build',
|
||||
cargo_options,
|
||||
]
|
||||
],
|
||||
)
|
||||
|
||||
copy_binary = custom_target(
|
||||
custom_target(
|
||||
'cp-binary',
|
||||
depends: cargo_build,
|
||||
build_by_default: true,
|
||||
|
|
@ -61,14 +58,15 @@ copy_binary = custom_target(
|
|||
],
|
||||
)
|
||||
|
||||
cargo_doc = custom_target(
|
||||
custom_target(
|
||||
'cargo-doc',
|
||||
build_by_default: false,
|
||||
build_always_stale: true,
|
||||
output: 'doc',
|
||||
console: true,
|
||||
command: [
|
||||
cargo, 'doc',
|
||||
cargo,
|
||||
'doc',
|
||||
cargo_options + ['--no-deps', '--document-private-items'],
|
||||
],
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue