2016-08-12 15:51:45 +00:00
|
|
|
#FIXME
|
|
|
|
#subdir('acmenc')
|
|
|
|
#subdir('acmmp3dec')
|
2018-08-28 07:24:07 +00:00
|
|
|
subdir('androidmedia')
|
2017-07-21 07:53:11 +00:00
|
|
|
subdir('applemedia')
|
2016-08-12 15:51:45 +00:00
|
|
|
subdir('bluez')
|
|
|
|
subdir('d3dvideosink')
|
2017-01-05 20:34:14 +00:00
|
|
|
subdir('decklink')
|
2016-08-12 15:51:45 +00:00
|
|
|
subdir('directsound')
|
|
|
|
#subdir('dshowdecwrapper')
|
|
|
|
#subdir('dshowsrcwrapper')
|
|
|
|
#subdir('dshowvideosink')
|
|
|
|
subdir('dvb')
|
2016-11-14 17:45:05 +00:00
|
|
|
subdir('fbdev')
|
2017-08-01 14:07:59 +00:00
|
|
|
subdir('ipcpipeline')
|
2016-11-14 15:33:20 +00:00
|
|
|
subdir('kms')
|
2016-10-13 21:30:43 +00:00
|
|
|
subdir('msdk')
|
2018-08-28 07:24:07 +00:00
|
|
|
subdir('opensles')
|
2017-06-21 17:45:04 +00:00
|
|
|
subdir('shm')
|
2017-01-02 14:26:40 +00:00
|
|
|
subdir('uvch264')
|
2016-08-12 15:51:45 +00:00
|
|
|
#subdir('vcd')
|
|
|
|
#subdir('vdpau')
|
|
|
|
subdir('wasapi')
|
|
|
|
subdir('winks')
|
|
|
|
subdir('winscreencap')
|
2018-11-19 13:40:50 +00:00
|
|
|
|
|
|
|
# CUDA dependency
|
|
|
|
cuda_dep = dependency('', required : false)
|
|
|
|
cudart_dep = dependency('', required : false)
|
|
|
|
cuda_libdir = ''
|
|
|
|
cuda_incdir = ''
|
|
|
|
|
|
|
|
if host_machine.system() == 'windows'
|
|
|
|
# On windows, CUDA_PATH env will be set by installer
|
|
|
|
cuda_root = run_command(python3, '-c', 'import os; print(os.environ.get("CUDA_PATH"))').stdout().strip()
|
2018-11-26 02:26:52 +00:00
|
|
|
if cuda_root != '' and cuda_root != 'None'
|
2018-11-19 13:40:50 +00:00
|
|
|
arc = ''
|
|
|
|
if build_machine.cpu_family() == 'x86_64'
|
|
|
|
arc = 'x64'
|
|
|
|
else
|
|
|
|
arc = 'Win32'
|
|
|
|
endif
|
|
|
|
cuda_libdir = join_paths (cuda_root, 'lib', arc)
|
|
|
|
cuda_incdir = join_paths (cuda_root, 'include')
|
|
|
|
cuda_lib = cc.find_library('cuda', dirs: cuda_libdir, required: false)
|
|
|
|
cudart_lib = cc.find_library('cudart', dirs: cuda_libdir, required: false)
|
|
|
|
if cuda_lib.found()
|
|
|
|
cuda_header_found = cc.has_header('cuda.h', args: '-I' + cuda_incdir)
|
|
|
|
cuda_lib_found = cc.has_function('cuInit', dependencies: cuda_lib)
|
|
|
|
if cuda_header_found and cuda_lib_found
|
|
|
|
cuda_dep = declare_dependency(include_directories: include_directories(cuda_incdir),
|
|
|
|
dependencies: cuda_lib)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
if cudart_lib.found()
|
|
|
|
cudart_header_found = cc.has_header('cuda_runtime_api.h', args: '-I' + cuda_incdir)
|
|
|
|
cudart_lib_found = cc.has_function('cudaGetErrorString', dependencies: cudart_lib)
|
|
|
|
if cudart_header_found and cudart_lib_found
|
|
|
|
cudart_dep = declare_dependency(dependencies: cudart_lib)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
cuda_versions = [
|
|
|
|
'10.0',
|
|
|
|
'9.2',
|
|
|
|
'9.1',
|
|
|
|
'9.0',
|
|
|
|
'8.0',
|
|
|
|
'7.5',
|
|
|
|
'7.0',
|
|
|
|
'6.5',
|
|
|
|
]
|
|
|
|
cuda_ver = ''
|
|
|
|
|
|
|
|
# FIXME: use break syntax when we use meson >= '0.49'
|
|
|
|
foreach v : cuda_versions
|
|
|
|
if cuda_ver == ''
|
|
|
|
cuda_dep = dependency('cuda-' + v, required: false)
|
|
|
|
cudart_dep = dependency('cudart-' + v, required: false)
|
|
|
|
if cuda_dep.found() and cudart_dep.found()
|
|
|
|
cuda_ver = v
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
if cuda_dep.found()
|
|
|
|
cuda_header_found = cc.has_header('cuda.h', dependencies: cuda_dep)
|
|
|
|
cuda_lib_found = cc.has_function('cuInit', dependencies: cuda_dep)
|
|
|
|
if not cuda_header_found or not cuda_lib_found
|
|
|
|
message ('Missing required header and/or function in cuda dependency')
|
|
|
|
cuda_dep = dependency('', required : false)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
if cudart_dep.found()
|
|
|
|
cudart_header_found = cc.has_header('cuda_runtime_api.h', dependencies: cudart_dep)
|
|
|
|
cudart_lib_found = cc.has_function('cudaGetErrorString', dependencies: cudart_dep)
|
|
|
|
if not cudart_header_found or not cudart_lib_found
|
|
|
|
message ('Missing required header and/or function in cudart dependency')
|
|
|
|
cudart_dep = dependency('', required : false)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
if cuda_dep.found() and cudart_dep.found()
|
|
|
|
subdir('nvdec')
|
2018-11-22 03:14:44 +00:00
|
|
|
subdir('nvenc')
|
2018-11-19 13:40:50 +00:00
|
|
|
elif get_option('nvdec').enabled()
|
|
|
|
error('The nvdec plugin was enabled explicitly, but required CUDA dependencies were not found.')
|
2018-11-22 03:14:44 +00:00
|
|
|
elif get_option('nvenc').enabled()
|
|
|
|
error('The nvenc plugin was enabled explicitly, but required CUDA dependencies were not found.')
|
2018-11-19 13:40:50 +00:00
|
|
|
endif
|