Merge pull request #2102 from LukashonakV/Cava

This commit is contained in:
Alex
2023-04-16 18:06:53 +02:00
committed by GitHub
7 changed files with 286 additions and 4 deletions

View File

@ -2,7 +2,7 @@ project(
'waybar', 'cpp', 'c',
version: '0.9.17',
license: 'MIT',
meson_version: '>= 0.49.0',
meson_version: '>= 0.50.0',
default_options : [
'cpp_std=c++17',
'buildtype=release',
@ -175,6 +175,8 @@ src_files = files(
'src/util/rewrite_string.cpp'
)
inc_dirs = ['include']
if is_linux
add_project_arguments('-DHAVE_CPU_LINUX', language: 'cpp')
add_project_arguments('-DHAVE_MEMORY_LINUX', language: 'cpp')
@ -334,6 +336,19 @@ if get_option('experimental')
add_project_arguments('-DUSE_EXPERIMENTAL', language: 'cpp')
endif
cava = compiler.find_library('cava',
required: get_option('cava'))
if not cava.found() and not get_option('cava').disabled()
cava = dependency('cava',
required: false,
fallback: [ 'cava', 'cava_dep' ])
endif
if cava.found()
add_project_arguments('-DHAVE_LIBCAVA', language: 'cpp')
src_files += 'src/modules/cava.cpp'
endif
subdir('protocol')
executable(
@ -367,9 +382,10 @@ executable(
gtk_layer_shell,
libsndio,
tz_dep,
xkbregistry
xkbregistry,
cava
],
include_directories: [include_directories('include')],
include_directories: inc_dirs,
install: true,
)