From 389bc11aec06666bc45bf4ea303215f6bd1c38d4 Mon Sep 17 00:00:00 2001 From: Veli Tasali Date: Tue, 4 May 2021 15:52:10 +0300 Subject: [PATCH] meson: Add option to skip `cargo-build` target This is only needed when building docs or similar to avoid overhead. --- meson_options.txt | 4 ++++ src/meson.build | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/meson_options.txt b/meson_options.txt index 35af6dbc..ea7fd89a 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -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.' +) diff --git a/src/meson.build b/src/meson.build index 692a9999..c75e983f 100644 --- a/src/meson.build +++ b/src/meson.build @@ -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,