From bf5033c70d3ee04a7a0d923c0c4f22b4d9dc92c0 Mon Sep 17 00:00:00 2001 From: Chris Cromer Date: Thu, 16 Feb 2023 01:27:15 -0300 Subject: [PATCH] make lib and bin optional to only compile what is wanted --- meson.build | 11 +++++++++-- meson_options.txt | 10 ++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 381f03d..b14aca0 100644 --- a/meson.build +++ b/meson.build @@ -29,5 +29,12 @@ if docs_enabled endif endif -subdir('lib') -subdir('src') +lib_enabled = get_option('lib') +if lib_enabled + subdir('lib') +endif + +bin_enabled = get_option('bin') +if bin_enabled + subdir('src') +endif diff --git a/meson_options.txt b/meson_options.txt index 4dff45a..69bb0db 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,3 +1,13 @@ +option('bin', + type: 'boolean', + value: true, + description: 'Build the obelisk compiler' +) +option('lib', + type: 'boolean', + value: true, + description: 'Build the obelisk library' +) option('docs', type: 'boolean', value: true,