From 553ac050f0190a8f36a4376b62112353c38a0ab2 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Tue, 12 May 2020 04:33:43 +0530 Subject: [PATCH] meson: Make C++ compiler detection not be automagic It is now controlled by the qt5 and/or taglib options. We won't silently fail to build taglib now. Part-of: --- ext/qt/meson.build | 5 +---- ext/taglib/meson.build | 2 +- meson.build | 1 - 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/ext/qt/meson.build b/ext/qt/meson.build index 295d50d7ae..0715ca416d 100644 --- a/ext/qt/meson.build +++ b/ext/qt/meson.build @@ -33,10 +33,7 @@ if not have_gstgl subdir_done() endif -if not have_cxx - if qt5_option.enabled() - error('qt5 qmlglsink plugin is enabled, but no C++ compiler is available') - endif +if not add_languages('cpp', required: qt5_option) subdir_done() endif diff --git a/ext/taglib/meson.build b/ext/taglib/meson.build index 18b9e31ae2..d526682a3e 100644 --- a/ext/taglib/meson.build +++ b/ext/taglib/meson.build @@ -6,7 +6,7 @@ taglib_sources = [ taglib_dep = dependency('taglib', version : '>= 1.5', required : get_option('taglib')) -if taglib_dep.found() and add_languages('cpp') +if taglib_dep.found() and add_languages('cpp', required : get_option('taglib')) extra_args = [] cxx = meson.get_compiler('cpp') if cxx.has_argument('-fvisibility=hidden') diff --git a/meson.build b/meson.build index b3049002ae..c501ccdf6b 100644 --- a/meson.build +++ b/meson.build @@ -16,7 +16,6 @@ else endif gst_version_is_dev = gst_version_minor % 2 == 1 and gst_version_micro < 90 -# FIXME: automagic have_cxx = add_languages('cpp', required : false) glib_req = '>= 2.44.0'