From c6ee8bbe94069f961238a2f0fd11fa0824172b24 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 14 Mar 2022 17:31:29 -0400 Subject: Make C++ compiler optional --- meson.build | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 88dbe8c..6eb99a3 100644 --- a/meson.build +++ b/meson.build @@ -22,8 +22,9 @@ cc = meson.get_compiler('c') # Enable C++ support if we're building the examples if get_option('examples') or get_option('tests') - add_languages(['cpp']) - cpp = meson.get_compiler('cpp') + if add_languages(['cpp'], required: false) + cpp = meson.get_compiler('cpp') + endif endif # Enable Objective C support if we're building for MacOS -- cgit v1.2.1