diff options
Diffstat (limited to 'sys/wasapi/meson.build')
-rw-r--r-- | sys/wasapi/meson.build | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/sys/wasapi/meson.build b/sys/wasapi/meson.build index c5b47dd03..cf57d8784 100644 --- a/sys/wasapi/meson.build +++ b/sys/wasapi/meson.build @@ -6,15 +6,27 @@ wasapi_sources = [ 'gstwasapidevice.c', ] -if host_system == 'windows' and cc.has_header('audioclient.h') - wasapi_dep = [cc.find_library('ole32'), cc.find_library('ksuser'), - cc.find_library('avrt', required : false)] +if host_system != 'windows' + if get_option('wasapi').disabled() + subdir_done() + elif get_option('wasapi').enabled() + error('Cannot build wasapi plugin when not building for Windows') + endif +endif + +ole32_dep = cc.find_library('ole32', required : get_option('wasapi')) +ksuser_dep = cc.find_library('ksuser', required : get_option('wasapi')) +have_audioclient_h = cc.has_header('audioclient.h') +if not have_audioclient_h and get_option('wasapi').enabled() + error('wasapi plugin enabled but audioclient.h not found') +endif +if ole32_dep.found() and ksuser_dep.found() and have_audioclient_h gstwasapi = library('gstwasapi', wasapi_sources, c_args : gst_plugins_bad_args + ['-DCOBJMACROS'], include_directories : [configinc], - dependencies : [gstaudio_dep] + wasapi_dep, + dependencies : [gstaudio_dep, ole32_dep, ksuser_dep], install : true, install_dir : plugins_install_dir) pkgconfig.generate(gstwasapi, install_dir : plugins_pkgconfig_install_dir) |