meson.build: Skip C++ detection unless we're targeting Windows
authorThomas Huth <thuth@redhat.com>
Wed, 5 Jul 2023 13:36:39 +0000 (15:36 +0200)
committerThomas Huth <thuth@redhat.com>
Mon, 10 Jul 2023 13:34:57 +0000 (15:34 +0200)
The only C++ code that we currently still have in the repository
is the code in qga/vss-win32/ - so we can skip the C++ detection
unless we are compiling binaries for Windows.

Message-Id: <20230705133639.146073-1-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
meson.build

index 58413d44a5f803ce67227678bd698c156689766d..162e664c2ba0778f73dd3b6a95946f9424529f7a 100644 (file)
@@ -20,7 +20,7 @@ config_host = keyval.load(meson.current_build_dir() / 'config-host.mak')
 
 cc = meson.get_compiler('c')
 all_languages = ['c']
-if add_languages('cpp', required: false, native: false)
+if targetos == 'windows' and add_languages('cpp', required: false, native: false)
   all_languages += ['cpp']
   cxx = meson.get_compiler('cpp')
 endif