nvcodec: Stop building for non-{Windows,Linux} target
authorSeungha Yang <seungha@centricular.com>
Sat, 23 Apr 2022 15:37:40 +0000 (00:37 +0900)
committerSeungha Yang <seungha@centricular.com>
Mon, 25 Apr 2022 15:50:52 +0000 (15:50 +0000)
The other platforms, specifically macOS have not been supported already
because this plugin loads so or dll. Moreover, NVIDIA dropped
support for macOS as of CUDA 11.0. See also
https://developer.nvidia.com/nvidia-cuda-toolkit-11_0_0-developer-tools-mac-hosts

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2283>

subprojects/gst-plugins-bad/gst-libs/gst/cuda/meson.build
subprojects/gst-plugins-bad/sys/nvcodec/meson.build

index ec06c71..61e75a1 100644 (file)
@@ -20,6 +20,12 @@ cuda_headers = [
     'gstnvrtcloader.h',
 ]
 
+gstcuda_dep = dependency('', required : false)
+
+if host_system not in ['windows', 'linux']
+  subdir_done()
+endif
+
 cuda_stubinc = include_directories('./stub')
 extra_c_args = ['-DGST_USE_UNSTABLE_API']
 
index 50e2978..35d5f18 100644 (file)
@@ -31,6 +31,13 @@ if get_option('nvcodec').disabled()
   subdir_done()
 endif
 
+if not gstcuda_dep.found()
+  if get_option('nvcodec').enabled()
+    error('The nvcodec was enabled explicitly, but required gstcuda dependency is not found')
+  endif
+  subdir_done()
+endif
+
 plugin_incdirs = [configinc, cuda_stubinc]
 extra_args = ['-DGST_USE_UNSTABLE_API']