meson: only require cpp for tests
authorJames Hilliard <james.hilliard1@gmail.com>
Fri, 16 Apr 2021 08:32:38 +0000 (02:32 -0600)
committerJames Hilliard <james.hilliard1@gmail.com>
Fri, 16 Apr 2021 09:04:56 +0000 (03:04 -0600)
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
meson.build
tests/meson.build

index 12b4641..cdb66bc 100644 (file)
@@ -1,5 +1,5 @@
 project(
-       'wayland', 'c', 'cpp',
+       'wayland', 'c',
        version: '1.19.90',
        license: 'MIT',
        meson_version: '>= 0.52.1',
index a32ac50..2e11af4 100644 (file)
@@ -64,15 +64,17 @@ executable(
        dependencies: test_runner_dep
 )
 
-test(
-       'cpp-compile-test',
-       executable(
+if add_languages('cpp')
+       test(
                'cpp-compile-test',
-               'cpp-compile-test.cpp',
-               wayland_server_protocol_h,
-               include_directories: src_inc
+               executable(
+                       'cpp-compile-test',
+                       'cpp-compile-test.cpp',
+                       wayland_server_protocol_h,
+                       include_directories: src_inc
+               )
        )
-)
+endif
 
 sed_path = find_program('sed').path()