1d3dvideosink_sources = [
2  'd3dhelpers.c',
3  'd3dvideosink.c',
4]
5
6if host_system != 'windows' or get_option('d3dvideosink').disabled()
7  subdir_done()
8endif
9
10d3d_dep = cc.find_library('d3d9', required : get_option('d3dvideosink'))
11gdi_dep = cc.find_library('gdi32', required : get_option('d3dvideosink'))
12have_d3d9_h = cc.has_header('d3d9.h')
13if not have_d3d9_h and get_option('d3dvideosink').enabled()
14  error('d3dvideosink plugin enabled but d3d9.h not found')
15endif
16
17if d3d_dep.found() and gdi_dep.found() and have_d3d9_h
18  gstd3dvideosink = library('gstd3d',
19    d3dvideosink_sources,
20    c_args : gst_plugins_bad_args,
21    include_directories : [configinc],
22    dependencies : [gstvideo_dep, d3d_dep, gdi_dep],
23    install : true,
24    install_dir : plugins_install_dir)
25  pkgconfig.generate(gstd3dvideosink, install_dir : plugins_pkgconfig_install_dir)
26endif
27