make c++ optional

This commit is contained in:
Wim Taymans 2019-01-08 12:18:45 +01:00
parent 3e77e9bf99
commit f8556f1a08
2 changed files with 6 additions and 2 deletions

View file

@ -1,4 +1,4 @@
project('pipewire', ['c', 'cpp' ],
project('pipewire', ['c' ],
version : '0.2.9',
license : 'MIT',
meson_version : '>= 0.42.0',
@ -37,6 +37,8 @@ spa_plugindir = join_paths(pipewire_libdir, 'spa')
gnome = import('gnome')
pkgconfig = import('pkgconfig')
have_cpp = add_languages('cpp', required : false)
cc = meson.get_compiler('c')
if cc.get_id() == 'gcc'

View file

@ -6,11 +6,13 @@ test_utils = executable('test-utils', 'test-utils.c',
include_directories : [spa_inc ],
dependencies : [],
install : false)
if have_cpp
test_cpp = executable('test-cpp', 'test-cpp.cpp',
include_directories : [spa_inc ],
dependencies : [],
install : false)
test('test-cpp', test_cpp)
endif
test('test-buffer', test_buffer)
test('test-utils', test_utils)
test('test-cpp', test_cpp)