meson: Add option to skip cargo-build target

This is only needed when building docs or similar
to avoid overhead.
This commit is contained in:
Veli Tasali 2021-05-04 15:52:10 +03:00 committed by Julian Sparber
parent f0b7e64eab
commit 389bc11aec
2 changed files with 5 additions and 1 deletions

View file

@ -8,3 +8,7 @@ option(
value: 'default',
description: 'The build profile for Fractal. One of "default" or "development".'
)
option(
'skip-cargo-build', type: 'boolean', value: false,
description: 'Skip building "cargo-build" target.'
)

View file

@ -52,7 +52,7 @@ sources = files(
custom_target(
'cargo-build',
build_by_default: true,
build_by_default: not get_option('skip-cargo-build'),
input: sources,
output: meson.project_name(),
console: true,