1directsoundsink_sources = [ 2 'gstdirectsoundsink.c', 3 'gstdirectsounddevice.c', 4 'gstdirectsoundplugin.c', 5] 6 7directsoundsink_device_flags = [ 8 '-DGstDirectSoundDeviceProvider=GstDirectSoundSinkDeviceProvider', 9 '-DGstDirectSoundDeviceProviderClass=GstDirectSoundSinkDeviceProviderClass', 10 '-DGstDirectSoundDevice=GstDirectSoundSinkDevice', 11 '-DGstDirectSoundDeviceClass=GstDirectSoundSinkDeviceClass', 12] 13 14have_dsound = false 15dsound_option = get_option('directsound') 16if host_system != 'windows' or dsound_option.disabled() 17 subdir_done() 18endif 19 20# TODO: https://github.com/mesonbuild/meson/issues/3940 21have_dsound = cc.has_header('dsound.h') 22if not have_dsound and dsound_option.enabled() 23 error('directsound plugin was enabled but dsound.h was not found') 24endif 25 26if have_dsound 27 directsoundsink_dep = [cc.find_library('dsound'), cc.find_library('winmm'), cc.find_library('ole32')] 28 29 gstdirectsoundsink = library('gstdirectsound', 30 directsoundsink_sources, 31 c_args : gst_plugins_good_args + directsoundsink_device_flags, 32 include_directories : [configinc], 33 dependencies : [gstaudio_dep] + directsoundsink_dep, 34 install : true, 35 install_dir : plugins_install_dir) 36 pkgconfig.generate(gstdirectsoundsink, install_dir : plugins_pkgconfig_install_dir) 37endif 38