Skip to content

Commit

Permalink
meson: make C++ compiler optional
Browse files Browse the repository at this point in the history
It's only used to check our headers are C++ clean and
for the Qt example.
  • Loading branch information
tp-m committed May 21, 2017
1 parent dfa548d commit 74d9748
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 3 additions & 1 deletion meson.build
@@ -1,4 +1,4 @@
project('gst-plugins-base', 'c', 'cpp',
project('gst-plugins-base', 'c',
version : '1.13.0.1',
meson_version : '>= 0.36.0',
default_options : [ 'warning_level=1',
Expand All @@ -15,6 +15,8 @@ else
gst_version_nano = 0
endif

have_cxx = add_languages('cpp', required : false)

glib_req = '>= 2.40.0'
orc_req = '>= 0.4.24'
gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)
Expand Down
8 changes: 7 additions & 1 deletion tests/check/meson.build
Expand Up @@ -64,9 +64,15 @@ base_tests = [
[ 'pipelines/theoraenc.c', not theoraenc_dep.found(), [ theoraenc_dep ] ],
[ 'pipelines/vorbisenc.c', not vorbisenc_dep.found() ],
[ 'pipelines/vorbisdec.c', not vorbisenc_dep.found(),],
[ 'libs/gstlibscpp.cc', false, [ ] ],
]

# Make sure our headers are C++ clean
if add_languages('cpp', required : false)
base_tests += [
[ 'libs/gstlibscpp.cc', false, [ ] ],
]
endif

# FIXME: enable orc testing
#orc_tests = [
# 'orc/video',
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/overlay/meson.build
Expand Up @@ -7,7 +7,7 @@ if x11_dep.found() # FIXME: originally if USE_X
install: false)
endif

if add_languages('cpp') # check for C++ support
if have_cxx # check for C++ support
qt5_mod = import('qt5')
qt5widgets_dep = dependency('qt5', modules : ['Gui', 'Widgets'], required: false)

Expand Down

0 comments on commit 74d9748

Please sign in to comment.