2023-01-13 15:13:56 +00:00
|
|
|
project('gBar',
|
|
|
|
['cpp'],
|
|
|
|
version: '0.0.1',
|
|
|
|
license: 'MIT',
|
2023-02-10 16:30:02 +00:00
|
|
|
meson_version: '>=0.49.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')
|
|
|
|
|
2023-01-28 14:07:07 +00:00
|
|
|
headers = [
|
|
|
|
'src/Common.h',
|
|
|
|
'src/System.h',
|
|
|
|
'src/PulseAudio.h',
|
|
|
|
'src/Widget.h',
|
|
|
|
'src/Window.h',
|
2023-02-09 15:13:40 +00:00
|
|
|
'src/Config.h',
|
|
|
|
'src/CSS.h'
|
2023-01-28 14:07:07 +00:00
|
|
|
]
|
|
|
|
|
2023-01-30 15:57:15 +00:00
|
|
|
if get_option('WithHyprland')
|
|
|
|
add_global_arguments('-DWITH_HYPRLAND', language: 'cpp')
|
2023-01-30 15:16:33 +00:00
|
|
|
headers += 'src/Hyprland.h'
|
2023-01-13 15:13:56 +00:00
|
|
|
endif
|
2023-01-30 15:57:15 +00:00
|
|
|
if get_option('WithNvidia')
|
|
|
|
add_global_arguments('-DWITH_NVIDIA', language: 'cpp')
|
2023-01-30 15:16:33 +00:00
|
|
|
headers += 'src/NvidiaGPU.h'
|
2023-01-13 15:13:56 +00:00
|
|
|
endif
|
2023-01-30 16:23:28 +00:00
|
|
|
if get_option('WithAMD')
|
|
|
|
add_global_arguments('-DWITH_AMD', language: 'cpp')
|
|
|
|
headers += 'src/AMDGPU.h'
|
|
|
|
endif
|
2023-01-30 15:57:15 +00:00
|
|
|
if get_option('WithBlueZ')
|
|
|
|
add_global_arguments('-DWITH_BLUEZ', language: 'cpp')
|
2023-01-13 15:13:56 +00:00
|
|
|
endif
|
2023-01-30 15:57:15 +00:00
|
|
|
if get_option('WithSys')
|
|
|
|
add_global_arguments('-DWITH_SYS', language: 'cpp')
|
2023-01-13 15:13:56 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
pulse = dependency('libpulse')
|
|
|
|
|
2023-01-28 14:07:07 +00:00
|
|
|
libgBar = library('gBar',
|
|
|
|
['src/Window.cpp',
|
2023-01-14 22:18:34 +00:00
|
|
|
'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',
|
2023-02-09 15:13:40 +00:00
|
|
|
'src/Config.cpp',
|
|
|
|
'src/CSS.cpp'
|
2023-01-14 22:18:34 +00:00
|
|
|
],
|
2023-01-13 15:13:56 +00:00
|
|
|
dependencies: [gtk, gtk_layer_shell, pulse],
|
2023-01-28 14:07:07 +00:00
|
|
|
install: true)
|
|
|
|
|
|
|
|
pkg = import('pkgconfig')
|
|
|
|
pkg.generate(libgBar)
|
|
|
|
|
|
|
|
executable(
|
|
|
|
'gBar',
|
|
|
|
['src/gBar.cpp'],
|
|
|
|
dependencies: [gtk],
|
|
|
|
link_with: libgBar,
|
2023-01-29 18:41:42 +00:00
|
|
|
install_rpath: '$ORIGIN/:$ORIGIN/../lib',
|
2023-01-13 15:13:56 +00:00
|
|
|
install: true
|
|
|
|
)
|
2023-01-28 14:07:07 +00:00
|
|
|
|
|
|
|
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'
|
|
|
|
)
|