mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-10-29 05:40:27 -04:00 
			
		
		
		
	meson: adds post meson setup/--reconfigure summary for auto features
As suggested by George Kiagiadakis, adds calls to summary() function for each feature that is by default set to auto, so that an overview of their effective state is printed at the end of meson setup or meson --reconfigure command. Currently ordering is a bit messy but tidying it up would detach the summary() functions from the dependencies they rely on and could be done later along with meson_options.txt re-ordering so that the two match as much as possible.
This commit is contained in:
		
							parent
							
								
									243d534476
								
							
						
					
					
						commit
						71d39e90ed
					
				
					 6 changed files with 34 additions and 1 deletions
				
			
		
							
								
								
									
										17
									
								
								meson.build
									
										
									
									
									
								
							
							
						
						
									
										17
									
								
								meson.build
									
										
									
									
									
								
							|  | @ -288,6 +288,8 @@ endif | |||
| 
 | ||||
| systemd = dependency('systemd', required: get_option('systemd')) | ||||
| systemd_dep = dependency('libsystemd',required: get_option('systemd')) | ||||
| summary({'systemd conf data': systemd.found()}, bool_yn: true) | ||||
| summary({'libsystemd': systemd_dep.found()}, bool_yn: true) | ||||
| if systemd.found() and systemd_dep.found() | ||||
|   cdata.set('HAVE_SYSTEMD', 1) | ||||
| endif | ||||
|  | @ -317,12 +319,18 @@ dl_lib = cc.find_library('dl', required : false) | |||
| pthread_lib = dependency('threads') | ||||
| dbus_dep = dependency('dbus-1') | ||||
| sdl_dep = dependency('sdl2', required : get_option('sdl2')) | ||||
| summary({'SDL 2': sdl_dep.found()}, bool_yn: true, section: 'Misc dependencies') | ||||
| ncurses_dep = dependency('ncursesw', required : false) | ||||
| sndfile_dep = dependency('sndfile', version : '>= 1.0.20', required : get_option('sndfile')) | ||||
| summary({'sndfile': sndfile_dep.found()}, bool_yn: true, section: 'pw-cat/pw-play/pw-dump tool') | ||||
| pulseaudio_dep = dependency('libpulse', required : get_option('libpulse')) | ||||
| summary({'libpulse': pulseaudio_dep.found()}, bool_yn: true, section: 'Streaming between daemons') | ||||
| avahi_dep = dependency('avahi-client', required : get_option('avahi')) | ||||
| summary({'Avahi DNS-SD (Zeroconf)': avahi_dep.found()}, bool_yn: true, | ||||
|   section: 'Streaming between daemons') | ||||
| 
 | ||||
| libusb_dep = dependency('libusb-1.0', required : get_option('libusb')) | ||||
| summary({'libusb (Bluetooth quirks)': libusb_dep.found()}, bool_yn: true, section: 'Backend') | ||||
| if libusb_dep.found() | ||||
|   cdata.set('HAVE_LIBUSB', 1) | ||||
| endif | ||||
|  | @ -349,7 +357,9 @@ gst_deps_def = { | |||
| gst_dep = [] | ||||
| foreach depname, kwargs: gst_deps_def | ||||
|   dep = dependency(depname, required: gst_option, kwargs: kwargs) | ||||
|   summary({depname: dep.found()}, bool_yn: true, section: 'GStreamer modules') | ||||
|   if not dep.found() | ||||
|     # Beware, there's logic below depending on the array clear here! | ||||
|     gst_dep = [] | ||||
|     if get_option('gstreamer-device-provider').enabled() | ||||
|       error('`gstreamer-device-provider` is enabled but `@0@` was not found.'.format(depname)) | ||||
|  | @ -359,6 +369,10 @@ foreach depname, kwargs: gst_deps_def | |||
|   gst_dep += [dep] | ||||
| endforeach | ||||
| 
 | ||||
| # This code relies on the array being empty if any dependency was not found | ||||
| gst_dp_found = gst_dep.length() > 0 | ||||
| summary({'gstreamer-device-provider': gst_dp_found}, bool_yn: true, section: 'Backend') | ||||
| 
 | ||||
| if not get_option('gstreamer-device-provider').disabled() | ||||
|   cdata.set('HAVE_GSTREAMER_DEVICE_PROVIDER', 1) | ||||
| endif | ||||
|  | @ -366,6 +380,7 @@ endif | |||
| webrtc_dep = dependency('webrtc-audio-processing', | ||||
|   version : ['>= 0.2', '< 1.0'], | ||||
|   required : get_option('echo-cancel-webrtc')) | ||||
| summary({'WebRTC Echo Canceling': webrtc_dep.found()}, bool_yn: true, section: 'Misc dependencies') | ||||
| 
 | ||||
| if webrtc_dep.found() | ||||
|   cdata.set('HAVE_WEBRTC', 1) | ||||
|  | @ -384,6 +399,7 @@ libinotify_dep = (build_machine.system() == 'freebsd' | |||
| libintl_dep = cc.find_library('intl', required: false) | ||||
| 
 | ||||
| alsa_dep = dependency('alsa', version : '>=1.1.7', required: get_option('pipewire-alsa')) | ||||
| summary({'pipewire-alsa': alsa_dep.found()}, bool_yn: true) | ||||
| 
 | ||||
| installed_tests_metadir = pipewire_datadir / 'installed-tests' / pipewire_name | ||||
| installed_tests_execdir = pipewire_libexecdir / 'installed-tests' / pipewire_name | ||||
|  | @ -421,6 +437,7 @@ if doxygen.found() | |||
| endif | ||||
| 
 | ||||
| xmltoman = find_program('xmltoman', required : get_option('man')) | ||||
| summary({'Manpage generation': xmltoman.found()}, bool_yn: true) | ||||
| if xmltoman.found() | ||||
|   subdir('man') | ||||
| endif | ||||
|  |  | |||
|  | @ -18,22 +18,33 @@ if not get_option('spa-plugins').disabled() | |||
| 
 | ||||
|   # plugin-specific dependencies | ||||
|   alsa_dep = dependency('alsa', required: get_option('alsa')) | ||||
|   summary({'ALSA': alsa_dep.found()}, bool_yn: true, section: 'Backend') | ||||
|   bluez_dep = dependency('bluez', version : '>= 4.101', required: get_option('bluez5')) | ||||
|   summary({'Bluetooth audio': bluez_dep.found()}, bool_yn: true, section: 'Backend') | ||||
|   if bluez_dep.found() | ||||
|     sbc_dep = dependency('sbc', required: get_option('bluez5')) | ||||
|     summary({'SBC': sbc_dep.found()}, bool_yn: true, section: 'Bluetooth audio codecs') | ||||
|     ldac_dep = dependency('ldacBT-enc', required : get_option('bluez5-codec-ldac')) | ||||
|     summary({'LDAC': ldac_dep.found()}, bool_yn: true, section: 'Bluetooth audio codecs') | ||||
|     ldac_abr_dep = dependency('ldacBT-abr', required : get_option('bluez5-codec-ldac')) | ||||
|     summary({'LDAC ABR': ldac_abr_dep.found()}, bool_yn: true, section: 'Bluetooth audio codecs') | ||||
|     aptx_dep = dependency('libopenaptx', version : '< 0.2.1', required : get_option('bluez5-codec-aptx')) | ||||
|     summary({'aptX': aptx_dep.found()}, bool_yn: true, section: 'Bluetooth audio codecs') | ||||
|     fdk_aac_dep = dependency('fdk-aac', required : get_option('bluez5-codec-aac')) | ||||
|     summary({'AAC': fdk_aac_dep.found()}, bool_yn: true, section: 'Bluetooth audio codecs') | ||||
|   endif | ||||
|   avcodec_dep = dependency('libavcodec', required: get_option('ffmpeg')) | ||||
|   jack_dep = dependency('jack', version : '>= 1.9.10', required: get_option('jack')) | ||||
|   summary({'JACK2': jack_dep.found()}, bool_yn: true, section: 'Backend') | ||||
|   vulkan_dep = dependency('vulkan', disabler : true, version : '>= 1.1.69', required: get_option('vulkan')) | ||||
|   summary({'Vulkan': vulkan_dep.found()}, bool_yn: true, section: 'Misc dependencies') | ||||
|   vulkan_headers = cc.has_header('vulkan/vulkan.h', dependencies : vulkan_dep) | ||||
|   libcamera_dep = dependency('camera', required: get_option('libcamera')) | ||||
|   summary({'libcamera': libcamera_dep.found()}, bool_yn: true, section: 'Camera portal') | ||||
| 
 | ||||
|   # common dependencies | ||||
|   libudev_dep = dependency('libudev', required: alsa_dep.found() or get_option('udev').enabled() or get_option('v4l2').enabled()) | ||||
|   summary({'Udev': libudev_dep.found()}, bool_yn: true, section: 'Backend') | ||||
| 
 | ||||
|   subdir('plugins') | ||||
| endif | ||||
|  |  | |||
|  | @ -6,6 +6,7 @@ libcamera_sources = ['libcamera.c', | |||
| 
 | ||||
| libdrm_dep = dependency('libdrm', version : '>= 2.4.98', | ||||
|                         required : get_option('libcamera')) | ||||
| summary({'libdrm': libdrm_dep.found()}, bool_yn: true, section: 'Camera portal') | ||||
| if libdrm_dep.found() | ||||
| libcameralib = shared_library('spa-libcamera', | ||||
|                           libcamera_sources, | ||||
|  |  | |||
|  | @ -30,7 +30,7 @@ sm_choice = get_option('default-session-manager') | |||
| 
 | ||||
| if sm_choice == 'media-session' | ||||
|   if get_option('session-managers') == [] | ||||
|     warning(' to use pw-uninstalled.sh manually edit pipewire-uninstalled.conf') | ||||
|     summary({'No session manager': 'pw-uninstalled.sh will not work out of the box!'}) | ||||
|   elif not build_ms | ||||
|     error('media-session is the chosen session manager but it won\'t be built') | ||||
|   endif | ||||
|  |  | |||
|  | @ -180,6 +180,7 @@ if avahi_dep.found() | |||
| endif | ||||
| 
 | ||||
| roc_lib = cc.find_library('roc', required: get_option('roc')) | ||||
| summary({'ROC': roc_lib.found()}, bool_yn: true, section: 'Streaming between daemons') | ||||
| if roc_lib.found() | ||||
|   pipewire_module_protocol_pulse_sources += [ | ||||
|     'module-protocol-pulse/modules/module-roc-sink.c', | ||||
|  |  | |||
|  | @ -26,7 +26,9 @@ if ncurses_dep.found() | |||
|   ) | ||||
| endif | ||||
| 
 | ||||
| build_pw_cat = false | ||||
| if not get_option('pw-cat').disabled() and sndfile_dep.found() | ||||
|   build_pw_cat = true | ||||
| 
 | ||||
|   pwcat_sources = [ | ||||
|     'pw-cat.c', | ||||
|  | @ -54,3 +56,4 @@ if not get_option('pw-cat').disabled() and sndfile_dep.found() | |||
| elif not sndfile_dep.found() and get_option('pw-cat').enabled() | ||||
| 	error('pw-cat is enabled but required dependency `sndfile` was not found.') | ||||
| endif | ||||
| summary({'Build pw-cat tool': build_pw_cat}, bool_yn: true, section: 'pw-cat/pw-play/pw-dump tool') | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Niklāvs Koļesņikovs
						Niklāvs Koļesņikovs