1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
project('pipemixer', 'c',
version: '0.3.1',
license: 'GPL-3.0-or-later',
default_options: ['warning_level=3'])
add_project_arguments('-Wno-pedantic', language: 'c')
add_project_arguments('-Wno-unused-value', language: 'c')
add_project_arguments('-Wno-unused-parameter', language: 'c')
git = find_program('git', required: false)
if git.found()
git_tag = run_command(git, 'describe', '--tags', check: false).stdout().strip()
if git_tag == ''
git_tag = 'unknown'
endif
git_branch = run_command(git, 'branch', '--show-current', check: false).stdout().strip()
if git_branch == ''
git_branch = 'unknown'
endif
else
git_tag = 'unknown'
git_branch = 'unknown'
endif
add_project_arguments('-DPIPEMIXER_VERSION="@0@"'.format(meson.project_version()), language: 'c')
add_project_arguments('-DPIPEMIXER_GIT_TAG="@0@"'.format(git_tag), language: 'c')
add_project_arguments('-DPIPEMIXER_GIT_BRANCH="@0@"'.format(git_branch), language: 'c')
pipewire_dep = dependency('libpipewire-0.3')
ncursesw_dep = dependency('ncursesw')
inih_dep = dependency('inih')
cc = meson.get_compiler('c')
m_dep = cc.find_library('m')
pipemixer_sources = [
'src/pipemixer.c',
'src/tui.c',
'src/menu.c',
'src/log.c',
'src/xmalloc.c',
'src/utils.c',
'src/config.c',
'src/signals.c',
'src/eventloop.c',
'src/collections/vec.c',
'src/collections/map.c',
'src/pw/common.c',
'src/pw/device.c',
'src/pw/node.c',
'src/pw/roundtrip.c',
'src/pw/events.c',
]
include_dirs = [
'src'
]
executable('pipemixer', pipemixer_sources,
include_directories: include_dirs,
dependencies: [ncursesw_dep, pipewire_dep, m_dep, inih_dep],
install: true)
install_data(
'man/pipemixer.1',
install_dir: join_paths(get_option('mandir'), 'man1'),
)
install_data(
'man/pipemixer.ini.5',
install_dir: join_paths(get_option('mandir'), 'man5'),
)
|