diff options
| author | Paul Buetow <paul@buetow.org> | 2026-07-12 17:20:15 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-07-12 17:20:15 +0300 |
| commit | 1770b12d5d95476310c27ccf39a91b5ba4a3f119 (patch) | |
| tree | c81bf1d97b5f71140acc73e970abf406f9f64fe7 /meson.build | |
| parent | f2b8ed6d2ea0744cfd1a36a6fbd1763926b873bb (diff) | |
bootstrap: meson build, test harness, CI, conventions, README/AGENTS (et0)
Phase 0 (task et0): lays the build/test/CI/convention groundwork before any
feature code.
- meson.build: project ggaze C11 -Wall -Wextra; deps gtk4/glib/gio/libadwaita;
feature options gegl/jxl/avif/heif (auto); generated ggaze-config.h with
app id, version, GGAZE_HAVE_* feature flags.
- tests: GLib g_test harness with separate unit/integration suites
(--suite unit / --suite integration); test_bootstrap sanity test proves
the harness compiles and the config header is reachable; -Db_coverage=true
coverage target wired.
- CI: .woodpecker/ci.yml three lanes (minimal, gegl, asan) with xvfb for the
integration track and a coverage lane that warns until M10.
- conventions: .clang-format (3-space, 80-col, K&R, *-on-var, return type on
its own line) + .editorconfig matching docs/coding-conventions.md; CI
clang-format --dry-run -Werror gate.
- top-level README.md (humans) and AGENTS.md (agents) pointing into docs/.
- LICENSE (GPL-3.0-or-later), .gitignore, dir placeholders.
Acceptance: meson setup build && ninja -C build && meson test -C build green;
clang-format --dry-run --Werror clean.
Diffstat (limited to 'meson.build')
| -rw-r--r-- | meson.build | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..4c67730 --- /dev/null +++ b/meson.build @@ -0,0 +1,51 @@ +# ggaze — GNOME Gaze +# +# A small, fast, native image viewer for Fedora Linux, written in C with +# GTK4. Full design lives in docs/; this file is the build root. Phase 0 +# establishes the build/test/CI/convention harness — no production sources +# yet (they arrive from M0; see docs/roadmap.md). + +project('ggaze', 'c', + version : '0.1.0', + license : 'GPL-3.0-or-later', + meson_version : '>= 1.1', + default_options : [ + 'warning_level=2', # -Wall -Wextra + 'c_std=c11', + 'b_pie=true', + ], +) + +# --- Always-required dependencies (the core viewer needs all of these) --- +gtk4_dep = dependency('gtk4') +glib_dep = dependency('glib-2.0') +gio_dep = dependency('gio-2.0') +adwaita_dep = dependency('libadwaita-1') + +# --- Optional backends (feature: auto/disabled/enabled). See meson_options.txt. +gegl_dep = dependency('gegl-0.4', required : get_option('gegl')) +jxl_dep = dependency('libjxl', required : get_option('jxl')) +avif_dep = dependency('libavif', required : get_option('avif')) +heif_dep = dependency('libheif', required : get_option('heif')) + +# --- Generated config header (app id, version, feature flags) --- +conf = configuration_data() +conf.set_quoted('GGAZE_VERSION', meson.project_version()) +conf.set_quoted('GGAZE_APP_ID', 'org.buetow.ggaze') +conf.set('GGAZE_HAVE_GEGL', gegl_dep.found() ? 1 : 0) +conf.set('GGAZE_HAVE_JXL', jxl_dep.found() ? 1 : 0) +conf.set('GGAZE_HAVE_AVIF', avif_dep.found() ? 1 : 0) +conf.set('GGAZE_HAVE_HEIF', heif_dep.found() ? 1 : 0) + +ggaze_conf_h = configure_file( + input : 'ggaze-config.h.in', + output : 'ggaze-config.h', + configuration : conf, +) + +# Include path: source root (generated header lands in the build root, which +# meson adds automatically for targets that list ggaze_conf_h as a source). +inc = include_directories('.') + +subdir('src') +subdir('tests')
\ No newline at end of file |
