gBar/meson.build

72 lines
1.4 KiB
Meson
Raw Normal View History

2023-01-13 15:13:56 +00:00
project('gBar',
['cpp'],
version: '0.0.1',
license: 'MIT',
meson_version: '>=0.46.0',
2023-01-13 15:13:56 +00:00
default_options: ['c_std=c++17', 'warning_level=3'])
gtk = dependency('gtk+-3.0')
gtk_layer_shell = dependency('gtk-layer-shell-0')
headers = [
'src/Common.h',
'src/System.h',
'src/PulseAudio.h',
'src/Widget.h',
'src/Window.h',
2023-01-29 15:47:50 +00:00
'src/Config.h'
]
2023-01-13 15:13:56 +00:00
if get_option('HasHyprland')
add_global_arguments('-DHAS_HYPRLAND', language: 'cpp')
headers += 'src/NvidiaGPU.h'
2023-01-13 15:13:56 +00:00
endif
if get_option('HasNvidia')
add_global_arguments('-DHAS_NVIDIA', language: 'cpp')
headers += 'src/Hyprland.h'
2023-01-13 15:13:56 +00:00
endif
if get_option('HasBlueZ')
add_global_arguments('-DHAS_BLUEZ', language: 'cpp')
endif
if get_option('HasSys')
add_global_arguments('-DHAS_SYS', language: 'cpp')
endif
pulse = dependency('libpulse')
libgBar = library('gBar',
['src/Window.cpp',
'src/Widget.cpp',
'src/System.cpp',
'src/Bar.cpp',
'src/AudioFlyin.cpp',
'src/BluetoothDevices.cpp',
2023-01-29 15:47:50 +00:00
'src/Plugin.cpp',
'src/Config.cpp'
],
2023-01-13 15:13:56 +00:00
dependencies: [gtk, gtk_layer_shell, pulse],
install: true)
pkg = import('pkgconfig')
pkg.generate(libgBar)
executable(
'gBar',
['src/gBar.cpp'],
dependencies: [gtk],
link_with: libgBar,
install_rpath: '$ORIGIN/:$ORIGIN/../lib',
2023-01-13 15:13:56 +00:00
install: true
)
install_headers(
headers,
subdir: 'gBar'
)
2023-01-28 16:29:10 +00:00
install_data(
['css/style.css',
'css/style.scss'],
install_dir: get_option('datadir') / 'gBar'
)