2018-08-10 14:37:03 +00:00
|
|
|
project(
|
|
|
|
'waybar', 'cpp', 'c',
|
2018-08-16 15:19:02 +00:00
|
|
|
version: '0.0.4',
|
2018-08-10 14:37:03 +00:00
|
|
|
license: 'MIT',
|
|
|
|
default_options : ['cpp_std=c++17'],
|
|
|
|
)
|
2018-08-08 21:54:58 +00:00
|
|
|
|
|
|
|
cpp_args = []
|
2018-08-11 00:09:39 +00:00
|
|
|
cpp_link_args = []
|
2018-08-08 21:54:58 +00:00
|
|
|
|
|
|
|
if false # libc++
|
|
|
|
cpp_args += ['-stdlib=libc++']
|
|
|
|
cpp_link_args += ['-stdlib=libc++', '-lc++abi']
|
|
|
|
|
|
|
|
cpp_link_args += ['-lc++fs']
|
|
|
|
else
|
|
|
|
# TODO: For std::filesystem in libstdc++. Still unstable? Or why is it not in libstdc++ proper yet?
|
|
|
|
cpp_link_args += ['-lstdc++fs']
|
|
|
|
endif
|
|
|
|
|
|
|
|
add_global_arguments(cpp_args, language : 'cpp')
|
|
|
|
add_global_link_arguments(cpp_link_args, language : 'cpp')
|
|
|
|
|
|
|
|
thread_dep = dependency('threads')
|
|
|
|
libinput = dependency('libinput')
|
|
|
|
fmt = dependency('fmt', fallback: ['fmtlib', 'fmt_dep'])
|
|
|
|
wayland_client = dependency('wayland-client')
|
|
|
|
wayland_cursor = dependency('wayland-cursor')
|
|
|
|
wayland_protos = dependency('wayland-protocols')
|
|
|
|
wlroots = dependency('wlroots', fallback: ['wlroots', 'wlroots'])
|
|
|
|
gtkmm = dependency('gtkmm-3.0')
|
|
|
|
jsoncpp = dependency('jsoncpp')
|
|
|
|
sigcpp = dependency('sigc++-2.0')
|
2018-08-09 14:38:24 +00:00
|
|
|
libnl = dependency('libnl-3.0')
|
|
|
|
libnlgen = dependency('libnl-genl-3.0')
|
2018-08-09 21:55:38 +00:00
|
|
|
libpulse = dependency('libpulse')
|
2018-08-08 21:54:58 +00:00
|
|
|
|
|
|
|
subdir('protocol')
|
|
|
|
|
2018-08-16 12:29:41 +00:00
|
|
|
src_files = run_command('find', './src', '-name', '*.cpp').stdout().strip().split('\n')
|
|
|
|
|
2018-08-08 21:54:58 +00:00
|
|
|
executable(
|
|
|
|
'waybar',
|
2018-08-16 12:29:41 +00:00
|
|
|
src_files,
|
2018-08-08 21:54:58 +00:00
|
|
|
dependencies: [
|
|
|
|
thread_dep,
|
|
|
|
wlroots,
|
|
|
|
client_protos,
|
|
|
|
wayland_client,
|
|
|
|
fmt,
|
|
|
|
sigcpp,
|
|
|
|
jsoncpp,
|
|
|
|
libinput,
|
|
|
|
wayland_cursor,
|
|
|
|
gtkmm,
|
2018-08-09 14:38:24 +00:00
|
|
|
libnl,
|
|
|
|
libnlgen,
|
2018-08-09 21:55:38 +00:00
|
|
|
libpulse,
|
2018-08-08 21:54:58 +00:00
|
|
|
],
|
|
|
|
include_directories: [include_directories('include')],
|
|
|
|
install: true,
|
|
|
|
)
|
2018-08-09 15:02:30 +00:00
|
|
|
|
|
|
|
install_data(
|
|
|
|
'./resources/config',
|
|
|
|
'./resources/style.css',
|
|
|
|
install_dir: '/etc/xdg/waybar',
|
|
|
|
)
|
2018-08-16 12:29:41 +00:00
|
|
|
|
|
|
|
clangtidy = find_program('clang-tidy', required: false)
|
|
|
|
|
|
|
|
if clangtidy.found()
|
|
|
|
run_target(
|
|
|
|
'tidy',
|
|
|
|
command: [
|
|
|
|
clangtidy,
|
|
|
|
'-checks=*,-fuchsia-default-arguments',
|
|
|
|
'-p', meson.build_root()
|
|
|
|
] + src_files)
|
|
|
|
endif
|