From: Peter Seiderer Date: Sat, 12 Jan 2019 10:10:46 +0000 (+0100) Subject: meson.build: enable CPP include check only in case CPP compiler is available X-Git-Tag: 1.12.901~94 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4516ba977c1e22d01da4cc50a8ebffa5d11d73f1;p=platform%2Fupstream%2Flibinput.git meson.build: enable CPP include check only in case CPP compiler is available Drop hard meson C++/CPP dependency, only needed for the build-time header inclusion test, build the test only in case C++/CPP compiler is available. Signed-off-by: Peter Seiderer Signed-off-by: Peter Hutterer --- diff --git a/meson.build b/meson.build index 7f114a20..f2f3dd1d 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('libinput', 'c', 'cpp', +project('libinput', 'c', version : '1.12.3', license : 'MIT/Expat', default_options : [ 'c_std=gnu99', 'warning_level=2' ], @@ -651,12 +651,14 @@ executable('test-build-linker', include_directories : [includes_src, includes_include], dependencies : [ dep_libinput, dep_libinput_util ], install : false) -# test including from C++ -executable('test-build-cxx', - 'test/build-cxx.cc', - dependencies : [dep_udev], - include_directories : [includes_src, includes_include], - install : false) +# test including from C++ (in case CPP compiler is available) +if add_languages('cpp', required: false) + executable('test-build-cxx', + 'test/build-cxx.cc', + dependencies : [dep_udev], + include_directories : [includes_src, includes_include], + install : false) +endif # This is the test suite runner, we allow disabling that one because of # dependencies