mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-25 01:10:08 +01:00
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 <ps.report@gmx.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
fc029e3fb5
commit
4516ba977c
1 changed files with 9 additions and 7 deletions
16
meson.build
16
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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue