aboutsummaryrefslogtreecommitdiffhomepage
path: root/meson.build
diff options
context:
space:
mode:
authorTrung Lê <8@tle.id.au>2026-02-21 23:40:05 +1100
committerTrung Lê <8@tle.id.au>2026-02-21 23:47:49 +1100
commit3eed1b64af72dcb4bcb8ae28d45856767d4acff1 (patch)
tree0aeef768169d69c4ed24c3cc03398c63aef3ff59 /meson.build
Initial commit
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build66
1 files changed, 66 insertions, 0 deletions
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..c891547
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,66 @@
+project('gpu-screen-recorder-adwaita', 'c',
+ version : '6.0.0',
+ default_options : ['warning_level=2', 'c_std=gnu17'],
+)
+
+add_project_arguments('-Wshadow', language : 'c')
+if get_option('buildtype') == 'debug'
+ add_project_arguments('-g3', language : 'c')
+elif get_option('buildtype') == 'release'
+ add_project_arguments('-DNDEBUG', language : 'c')
+endif
+
+src = [
+ 'src/main.c',
+ 'src/gsr-window.c',
+ 'src/gsr-info.c',
+ 'src/gsr-config.c',
+ 'src/gsr-config-page.c',
+ 'src/gsr-stream-page.c',
+ 'src/gsr-record-page.c',
+ 'src/gsr-replay-page.c',
+ 'src/gsr-hotkeys.c',
+]
+
+dep = [
+ dependency('libadwaita-1', version : '>=1.8'),
+]
+
+c_args = [
+ '-DGSR_ICONS_PATH="' + join_paths(get_option('prefix'), get_option('datadir'), 'icons') + '"',
+ '-DGSR_VERSION="' + meson.project_version() + '"',
+]
+
+if get_option('x11')
+ src += [
+ 'src/gsr-x11-hotkeys.c',
+ 'src/gsr-x11-window-picker.c',
+ 'src/gsr-shortcut-accel-dialog.c',
+ ]
+ dep += dependency('x11')
+ c_args += '-DHAVE_X11'
+endif
+
+if get_option('wayland')
+ src += [
+ 'src/global_shortcuts.c',
+ ]
+ c_args += '-DHAVE_WAYLAND'
+endif
+
+executable('gpu-screen-recorder-adw',
+ src,
+ dependencies : dep,
+ include_directories : include_directories('src'),
+ install : true,
+ c_args : c_args,
+)
+
+install_data(
+ files('../com.dec05eba.gpu_screen_recorder.desktop'),
+ install_dir : join_paths(get_option('prefix'), get_option('datadir'), 'applications'),
+)
+install_subdir('icons/hicolor', install_dir : join_paths(get_option('prefix'), get_option('datadir'), 'icons'))
+
+gnome = import('gnome')
+gnome.post_install(gtk_update_icon_cache : true, update_desktop_database : true)