nvenc: Fix build when cuda is found but nvenc is disabled
authorNirbheek Chauhan <nirbheek@centricular.com>
Mon, 11 Mar 2019 09:15:14 +0000 (14:45 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Mon, 11 Mar 2019 09:15:14 +0000 (14:45 +0530)
tests\check\meson.build:21:5: ERROR:  Unknown variable "use_nvenc_gl".

Also do the same change in nvdec, just to be defensive about future
issues.

sys/nvdec/meson.build
sys/nvenc/meson.build

index 09c60ec..016c3dc 100644 (file)
@@ -3,13 +3,14 @@ nvdec_sources = [
   'plugin.c'
 ]
 
+nvcuvid_dep_found = false
+nvcuvid_incdirs = []
+
 nvdec_option = get_option('nvdec')
 if nvdec_option.disabled()
   subdir_done()
 endif
 
-nvcuvid_dep_found = false
-nvcuvid_incdirs = []
 if host_machine.system() == 'windows'
   cuda_libdirs = [cuda_libdir]
   # NOTE: Newer CUDA toolkit versions do not ship with the nvcuvid library, and
index 2a6739f..88d3929 100644 (file)
@@ -5,14 +5,14 @@ nvenc_sources = [
   'gstnvh265enc.c',
 ]
 
+use_nvenc_gl = false
+extra_c_args = []
+
 nvenc_option = get_option('nvenc')
 if nvenc_option.disabled()
   subdir_done()
 endif
 
-use_nvenc_gl = false
-extra_c_args = []
-
 if host_machine.system() == 'windows'
   if cc.has_header('cuda_gl_interop.h', args: '-I' + cuda_incdir)
     use_nvenc_gl = true