2018-07-27 13:29:23 +00:00
|
|
|
# Don't do any dependency checks if disabled
|
|
|
|
if get_option('dts').disabled()
|
|
|
|
subdir_done()
|
|
|
|
endif
|
2016-08-12 15:51:45 +00:00
|
|
|
|
2018-07-27 13:29:23 +00:00
|
|
|
# Detect libdca using a pkg-config file, or manually
|
|
|
|
dca_dep = dependency('libdca', required : false)
|
|
|
|
if not dca_dep.found()
|
|
|
|
if cc.has_header_symbol('dca.h', 'dca_init')
|
|
|
|
dca_dep = cc.find_library('dca', required : false)
|
|
|
|
endif
|
|
|
|
if not dca_dep.found() and get_option('dts').enabled()
|
|
|
|
error('DTS plugin enabled, but libdca not found')
|
|
|
|
endif
|
2016-08-12 15:51:45 +00:00
|
|
|
endif
|
|
|
|
|
2018-09-05 16:01:22 +00:00
|
|
|
no_warn_c_args = []
|
|
|
|
if cc.get_id() != 'msvc'
|
|
|
|
# autotools didn't use the libdca pkg-config cflags, and they
|
|
|
|
# can point to a non-existing location (/usr/include/dca)
|
|
|
|
no_warn_c_args = ['-Wno-missing-include-dirs']
|
|
|
|
endif
|
2018-03-01 17:44:13 +00:00
|
|
|
|
2016-08-12 15:51:45 +00:00
|
|
|
if dca_dep.found()
|
|
|
|
gstdtsdec = library('gstdtsdec',
|
|
|
|
'gstdtsdec.c',
|
2018-03-01 17:44:13 +00:00
|
|
|
c_args : gst_plugins_bad_args + no_warn_c_args,
|
2016-08-12 15:51:45 +00:00
|
|
|
link_args : noseh_link_args,
|
|
|
|
include_directories : [configinc, libsinc],
|
|
|
|
dependencies : [gstaudio_dep, orc_dep, dca_dep],
|
|
|
|
install : true,
|
|
|
|
install_dir : plugins_install_dir,
|
|
|
|
)
|
2018-04-24 18:05:30 +00:00
|
|
|
pkgconfig.generate(gstdtsdec, install_dir : plugins_pkgconfig_install_dir)
|
2018-10-22 09:30:45 +00:00
|
|
|
plugins += [gstdtsdec]
|
2016-08-12 15:51:45 +00:00
|
|
|
endif
|