mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
meson: fix build with missing libudev-devel
(cherry picked from commit b4c7973d49)
This commit is contained in:
parent
ee5a6f16f9
commit
3a4374ec09
7 changed files with 28 additions and 9 deletions
|
|
@ -104,7 +104,8 @@ if get_option('spa-plugins').allowed()
|
||||||
cdata.set('HAVE_ALSA_COMPRESS_OFFLOAD', compress_offload_option.allowed())
|
cdata.set('HAVE_ALSA_COMPRESS_OFFLOAD', compress_offload_option.allowed())
|
||||||
|
|
||||||
# common dependencies
|
# common dependencies
|
||||||
libudev_dep = dependency('libudev', required: alsa_dep.found() or get_option('udev').enabled() or get_option('v4l2').enabled())
|
libudev_dep = dependency('libudev', required: get_option('udev').enabled())
|
||||||
|
cdata.set('HAVE_LIBUDEV', libudev_dep.found())
|
||||||
summary({'Udev': libudev_dep.found()}, bool_yn: true, section: 'Backend')
|
summary({'Udev': libudev_dep.found()}, bool_yn: true, section: 'Backend')
|
||||||
|
|
||||||
subdir('plugins')
|
subdir('plugins')
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,13 @@ int spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t
|
||||||
*factory = &spa_alsa_sink_factory;
|
*factory = &spa_alsa_sink_factory;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
#ifdef HAVE_LIBUDEV
|
||||||
*factory = &spa_alsa_udev_factory;
|
*factory = &spa_alsa_udev_factory;
|
||||||
break;
|
break;
|
||||||
|
#else
|
||||||
|
(*index)++;
|
||||||
|
SPA_FALLTHROUGH;
|
||||||
|
#endif
|
||||||
case 3:
|
case 3:
|
||||||
*factory = &spa_alsa_pcm_device_factory;
|
*factory = &spa_alsa_pcm_device_factory;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
subdir('acp')
|
subdir('acp')
|
||||||
subdir('mixer')
|
subdir('mixer')
|
||||||
|
|
||||||
spa_alsa_dependencies = [ spa_dep, alsa_dep, libudev_dep, mathlib, epoll_shim_dep, libinotify_dep ]
|
spa_alsa_dependencies = [ spa_dep, alsa_dep, mathlib, epoll_shim_dep, libinotify_dep ]
|
||||||
|
|
||||||
spa_alsa_sources = ['alsa.c',
|
spa_alsa_sources = ['alsa.c',
|
||||||
'alsa.h',
|
'alsa.h',
|
||||||
'alsa-udev.c',
|
|
||||||
'alsa-acp-device.c',
|
'alsa-acp-device.c',
|
||||||
'alsa-pcm-device.c',
|
'alsa-pcm-device.c',
|
||||||
'alsa-pcm-sink.c',
|
'alsa-pcm-sink.c',
|
||||||
|
|
@ -14,6 +13,11 @@ spa_alsa_sources = ['alsa.c',
|
||||||
'alsa-seq-bridge.c',
|
'alsa-seq-bridge.c',
|
||||||
'alsa-seq.c']
|
'alsa-seq.c']
|
||||||
|
|
||||||
|
if libudev_dep.found()
|
||||||
|
spa_alsa_sources += [ 'alsa-udev.c' ]
|
||||||
|
spa_alsa_dependencies += [ libudev_dep ]
|
||||||
|
endif
|
||||||
|
|
||||||
if compress_offload_option.allowed()
|
if compress_offload_option.allowed()
|
||||||
spa_alsa_sources += ['alsa-compress-offload-sink.c',
|
spa_alsa_sources += ['alsa-compress-offload-sink.c',
|
||||||
'alsa-compress-offload-device.c',
|
'alsa-compress-offload-device.c',
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,6 @@ libcamera_sources = [
|
||||||
libcameralib = shared_library('spa-libcamera',
|
libcameralib = shared_library('spa-libcamera',
|
||||||
libcamera_sources,
|
libcamera_sources,
|
||||||
include_directories : [ configinc ],
|
include_directories : [ configinc ],
|
||||||
dependencies : [ spa_dep, libudev_dep, libcamera_dep, pthread_lib ],
|
dependencies : [ spa_dep, libcamera_dep, pthread_lib ],
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : spa_plugindir / 'libcamera')
|
install_dir : spa_plugindir / 'libcamera')
|
||||||
|
|
|
||||||
|
|
@ -45,10 +45,9 @@ if have_vulkan
|
||||||
endif
|
endif
|
||||||
|
|
||||||
v4l2_header_found = cc.has_header('linux/videodev2.h', required: get_option('v4l2'))
|
v4l2_header_found = cc.has_header('linux/videodev2.h', required: get_option('v4l2'))
|
||||||
v4l2_supported = libudev_dep.found() and v4l2_header_found
|
|
||||||
summary({'V4L2 kernel header': v4l2_header_found}, bool_yn: true, section: 'Backend')
|
summary({'V4L2 kernel header': v4l2_header_found}, bool_yn: true, section: 'Backend')
|
||||||
summary({'V4L2 enabled': v4l2_supported}, bool_yn: true, section: 'Backend')
|
summary({'V4L2 enabled': v4l2_header_found}, bool_yn: true, section: 'Backend')
|
||||||
if v4l2_supported
|
if v4l2_header_found
|
||||||
subdir('v4l2')
|
subdir('v4l2')
|
||||||
endif
|
endif
|
||||||
if libcamera_dep.found()
|
if libcamera_dep.found()
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,15 @@
|
||||||
v4l2_sources = ['v4l2.c',
|
v4l2_sources = ['v4l2.c',
|
||||||
'v4l2-device.c',
|
'v4l2-device.c',
|
||||||
'v4l2-udev.c',
|
|
||||||
'v4l2-source.c']
|
'v4l2-source.c']
|
||||||
|
v4l2_dependencies = [ spa_dep, libinotify_dep ]
|
||||||
|
|
||||||
|
if libudev_dep.found()
|
||||||
|
v4l2_sources += [ 'v4l2-udev.c' ]
|
||||||
|
v4l2_dependencies += [ libudev_dep ]
|
||||||
|
endif
|
||||||
|
|
||||||
v4l2lib = shared_library('spa-v4l2',
|
v4l2lib = shared_library('spa-v4l2',
|
||||||
v4l2_sources,
|
v4l2_sources,
|
||||||
dependencies : [ spa_dep, libudev_dep, libinotify_dep ],
|
dependencies : v4l2_dependencies,
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : spa_plugindir / 'v4l2')
|
install_dir : spa_plugindir / 'v4l2')
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,13 @@ int spa_handle_factory_enum(const struct spa_handle_factory **factory,
|
||||||
*factory = &spa_v4l2_source_factory;
|
*factory = &spa_v4l2_source_factory;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
|
#ifdef HAVE_LIBUDEV
|
||||||
*factory = &spa_v4l2_udev_factory;
|
*factory = &spa_v4l2_udev_factory;
|
||||||
break;
|
break;
|
||||||
|
#else
|
||||||
|
(*index)++;
|
||||||
|
SPA_FALLTHROUGH;
|
||||||
|
#endif
|
||||||
case 2:
|
case 2:
|
||||||
*factory = &spa_v4l2_device_factory;
|
*factory = &spa_v4l2_device_factory;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue