From e29c41845275f519f788b855d6858ee0bb915ff6 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 5 Feb 2026 13:03:26 +0100 Subject: [PATCH] build: simplify platform detection --- meson.build | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/meson.build b/meson.build index 56e9ad33..ad40ff48 100644 --- a/meson.build +++ b/meson.build @@ -10,21 +10,14 @@ project('profanity', 'c', # Determine platform host_system = host_machine.system() -platform = 'unknown' - -if host_system == 'freebsd' - platform = 'freebsd' -elif host_system == 'netbsd' - platform = 'netbsd' -elif host_system == 'openbsd' - platform = 'openbsd' -elif host_system == 'darwin' - platform = 'osx' -elif host_system == 'cygwin' - platform = 'cygwin' -else - platform = 'nix' -endif +platform_map = { + 'freebsd': 'freebsd', + 'netbsd': 'netbsd', + 'openbsd': 'openbsd', + 'darwin': 'osx', + 'cygwin': 'cygwin', +} +platform = platform_map.get(host_system, 'nix') # Configuration data conf_data = configuration_data()