meson: make wpipc optional and disabled by default

This is only intended to be used with specific embedded
applications. There is no good reason to use it on
a standard desktop environment.
This commit is contained in:
George Kiagiadakis
2021-05-06 11:52:01 +03:00
parent 272022b8ea
commit 5efb46a3e2
5 changed files with 32 additions and 21 deletions

View File

@@ -1,3 +1,8 @@
if get_option('wpipc').disabled()
wpipc_dep = disabler()
subdir_done()
endif
wpipc_lib_sources = files( wpipc_lib_sources = files(
'utils.c', 'utils.c',
'protocol.c', 'protocol.c',

View File

@@ -19,3 +19,5 @@ option('systemd-system-unit-dir',
option('systemd-user-unit-dir', option('systemd-user-unit-dir',
type : 'string', type : 'string',
description : 'Directory for user systemd units') description : 'Directory for user systemd units')
option('wpipc', type : 'feature', value : 'disabled',
description: 'Build the wpipc library and module-ipc')

View File

@@ -177,6 +177,7 @@ shared_library(
dependencies : [wp_dep, pipewire_dep, mathlib], dependencies : [wp_dep, pipewire_dep, mathlib],
) )
if wpipc_dep.found()
shared_library( shared_library(
'wireplumber-module-ipc', 'wireplumber-module-ipc',
[ [
@@ -187,3 +188,4 @@ shared_library(
install_dir : wireplumber_module_dir, install_dir : wireplumber_module_dir,
dependencies : [wp_dep, pipewire_dep, wpipc_dep], dependencies : [wp_dep, pipewire_dep, wpipc_dep],
) )
endif

View File

@@ -9,6 +9,7 @@ executable('audiotestsrc-play',
dependencies : [giounix_dep, wp_dep, pipewire_dep], dependencies : [giounix_dep, wp_dep, pipewire_dep],
) )
if wpipc_dep.found()
executable('wpipc-client', executable('wpipc-client',
'wpipc-client.c', 'wpipc-client.c',
c_args : [ c_args : [
@@ -19,3 +20,4 @@ executable('wpipc-client',
install: false, install: false,
dependencies : [wpipc_dep], dependencies : [wpipc_dep],
) )
endif

View File

@@ -1,5 +1,5 @@
subdir('wp') subdir('wp')
subdir('wplua') subdir('wplua')
subdir('wpipc') subdir('wpipc', if_found: wpipc_dep)
subdir('modules') subdir('modules')
subdir('examples') subdir('examples')