forked from pyt0xic/hyprfocus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
67 lines (57 loc) · 1.38 KB
/
meson.build
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
project(
'hyprfocus',
'cpp',
default_options: ['buildtype=release'],
)
cpp_compiler = meson.get_compiler('cpp')
if cpp_compiler.has_argument('-std=c++23')
add_global_arguments('-std=c++23', language: 'cpp')
elif cpp_compiler.has_argument('-std=c++2b')
add_global_arguments('-std=c++2b', language: 'cpp')
else
error(
'Could not configure current C++ compiler ('
+ cpp_compiler.get_id()
+ ' '
+ cpp_compiler.version()
+ ') with required C++ standard (C++23)',
)
endif
add_project_arguments(
'-fPIC',
'--no-gnu-unique',
language: 'cpp',
)
src = [
'src/main.cpp',
'src/IFocusAnimation.cpp',
]
flash = get_option('flash')
shrink = get_option('shrink')
if flash.disabled() and shrink.disabled()
error('You must enable at least one feature: flash or shrink')
endif
if not flash.disabled()
src += 'src/Flash.cpp'
add_project_arguments('-DFLASH', language: 'cpp')
endif
if not shrink.disabled()
src += 'src/Shrink.cpp'
add_project_arguments('-DSHRINK', language: 'cpp')
endif
if get_option('xwayland').disabled()
add_project_arguments('-DNO_XWAYLAND', language: 'cpp')
endif
if get_option('dispatch').enabled()
add_project_arguments('-DDISPATCH', language: 'cpp')
endif
shared_module(
meson.project_name(),
src,
dependencies: [
dependency('hyprland', version: '>=0.40'),
dependency('pixman-1'),
dependency('libdrm'),
],
install: true,
)