openexr: Fix compilation with OpenEXR 2.4
authorJan Alexander Steffens (heftig) <jsteffens@make.tv>
Sat, 2 Nov 2019 15:51:09 +0000 (16:51 +0100)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Sat, 2 Nov 2019 22:08:55 +0000 (22:08 +0000)
It uses modern C++; adding -std=c++98 breaks the build.

ext/openexr/meson.build

index 53cd5120f7dd6a27d29fe3c6b07276e41b41e541..0336fb886f6f6252a01993445d9d179c9c6a21f1 100644 (file)
@@ -1,11 +1,16 @@
 openexr_dep = dependency('OpenEXR', required: get_option('openexr'))
 if openexr_dep.found()
-  openexr_extra_cpp_args = cxx.get_supported_arguments(['-std=c++98'])
+  openexr_cppargs = []
+
+  if openexr_dep.version().version_compare('< 2.4.0')
+    openexr_cppargs += cxx.get_supported_arguments(['-std=c++98'])
+  endif
+
   gstopenexr = library('gstopenexr',
     'gstopenexr.c',
     'gstopenexrdec.cpp',
     c_args: gst_plugins_bad_args,
-    cpp_args: gst_plugins_bad_args + openexr_extra_cpp_args,
+    cpp_args: gst_plugins_bad_args + openexr_cppargs,
     link_args: noseh_link_args,
     include_directories: [configinc, libsinc],
     dependencies: [gstvideo_dep, openexr_dep],