-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmeson.build
More file actions
executable file
·85 lines (73 loc) · 2.61 KB
/
Copy pathmeson.build
File metadata and controls
executable file
·85 lines (73 loc) · 2.61 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Meson build configuration for window-toggle
project('window-toggle', 'c',
default_options: [
'warning_level=1',
]
)
# Disable C99 strict mode to allow implicit declarations (like Makefile)
add_project_arguments('-std=gnu99', language: 'c')
# Get C compiler (needed for find_library)
c_compiler = meson.get_compiler('c')
# Dependencies
x11_dep = dependency('xcb')
xkbcommon_dep = dependency('xkbcommon')
# Find X11 library for linking
x11_lib = c_compiler.find_library('X11', required: true)
# Build executable
window_toggle = executable('window-toggle',
'window-toggle.c',
'config.c',
'window-manager.c',
'daemon.c',
'ipc.c',
'app-binding.c',
dependencies: [x11_dep, xkbcommon_dep, x11_lib],
install: true,
install_dir: join_paths(get_option('prefix'), 'bin')
)
# Install the GTK4 viewer script alongside the binary.
# Runtime: PyGObject + GTK4 + libadwaita provided by the host distribution.
install_data(
'window-toggle-viewer',
install_dir: join_paths(get_option('prefix'), 'bin'),
install_mode: 'rwxr-xr-x',
)
# Install the dconf registration helper under libexec so uninstall can find it.
install_data(
'scripts/meson-viewer-install.sh',
install_dir: join_paths(get_option('prefix'), 'libexec', 'window-toggle'),
install_mode: 'rwxr-xr-x',
)
install_data(
'scripts/meson-viewer-uninstall.sh',
install_dir: join_paths(get_option('prefix'), 'libexec', 'window-toggle'),
install_mode: 'rwxr-xr-x',
)
# Install the app icon (SVG source + raster fallbacks for old desktop
# environments that don't render SVG icons in file managers).
install_data(
'data/icons/hicolor/scalable/apps/window-toggle.svg',
install_dir: join_paths(get_option('datadir'), 'icons', 'hicolor', 'scalable', 'apps'),
)
install_data(
'data/icons/hicolor/128x128/apps/window-toggle.png',
install_dir: join_paths(get_option('datadir'), 'icons', 'hicolor', '128x128', 'apps'),
)
install_data(
'data/icons/hicolor/48x48/apps/window-toggle.png',
install_dir: join_paths(get_option('datadir'), 'icons', 'hicolor', '48x48', 'apps'),
)
# .desktop file so the tool shows up in the application launcher
# (icon name "window-toggle" resolves to the SVG/PNG above).
install_data(
'data/applications/window-toggle.desktop',
install_dir: join_paths(get_option('datadir'), 'applications'),
)
# Run the dconf registration script at install time. The script is
# skip_if_destdir: false so package builds (with DESTDIR) still get it
# executed against the real dconf database.
meson.add_install_script(
'scripts/meson-viewer-install.sh',
)
# Test
test('basic test', window_toggle)