meson: Make C++ compiler detection not be automagic
authorNirbheek Chauhan <nirbheek@centricular.com>
Mon, 11 May 2020 23:03:43 +0000 (04:33 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Mon, 11 May 2020 23:03:43 +0000 (04:33 +0530)
It is now controlled by the qt5 and/or taglib options. We won't
silently fail to build taglib now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/587>

ext/qt/meson.build
ext/taglib/meson.build
meson.build

index 295d50d..0715ca4 100644 (file)
@@ -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
 
index 18b9e31..d526682 100644 (file)
@@ -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')
index b304900..c501ccd 100644 (file)
@@ -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'