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
|
project('monmon', 'cpp',
version: '0.1',
default_options: ['cpp_std=c++11'])
cpp_optional_flags = ['-fno-rtti', '-fno-exceptions',
'-fvisibility=hidden',
'-Wall', '-Wextra',
'-Wno-missing-field-initializers',
'-Wno-maybe-uninitialized']
cpp_flags = ['-DHAVE_CONFIG_H']
if get_option('buildtype') == 'release'
# If asserts are disabled parameters and variables used for only that
# end up causing warnings
cpp_optional_flags += ['-Wno-unused-parameter', '-Wno-unused-variable']
cpp_flags += '-DNDEBUG'
endif
cpp = meson.get_compiler('cpp')
foreach flag : cpp_optional_flags
if cpp.has_argument(flag)
cpp_flags += flag
endif
endforeach
add_global_arguments(cpp_flags, language: 'cpp')
conf = configuration_data()
conf.set('VERSION', '"' + meson.project_version() + '"')
conf.set10('FAKE_MONITOR', get_option('fake_monitor'))
xcb_deps = [dependency('xcb', version : '>= 1.10'),
dependency('xcb-image', version : '>= 0.3.8'),
dependency('xcb-event', version : '>= 0.3.8'),
dependency('xcb-ewmh', version : '>= 0.3.8'),
dependency('xcb-keysyms', version : '>= 0.3.8'),
dependency('xcb-icccm', version : '>= 0.3.8'),
dependency('xcb-render', version : '>= 0.3.8')]
dep_cairo = dependency('cairo-xcb', version : '>= 1.12.0')
dep_pango = dependency('pangocairo', version : '>= 1.36.8')
dep_icecc = dependency('icecc', version : '>= 1.1')
dep_thread = dependency('threads')
configure_file(output: 'config.h',
configuration: conf)
executable('monmon',
sources: ['src/main.cc', 'src/x.cc', 'src/args.cc',
'src/poll_looper.cc', 'src/looper.cc', 'src/clock.cc',
'src/io.cc', 'src/monitor.cc', 'src/fake_monitor.cc',
'src/animator.cc', 'src/blissful_monitor.cc',
'src/monmon.cc', 'src/icecc.cc'],
dependencies: [dep_thread, dep_pango, dep_cairo, dep_icecc,
xcb_deps],
install: true)
|