mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-30 11:06:21 +00:00
build: simplify platform detection
This commit is contained in:
23
meson.build
23
meson.build
@@ -10,21 +10,14 @@ project('profanity', 'c',
|
|||||||
|
|
||||||
# Determine platform
|
# Determine platform
|
||||||
host_system = host_machine.system()
|
host_system = host_machine.system()
|
||||||
platform = 'unknown'
|
platform_map = {
|
||||||
|
'freebsd': 'freebsd',
|
||||||
if host_system == 'freebsd'
|
'netbsd': 'netbsd',
|
||||||
platform = 'freebsd'
|
'openbsd': 'openbsd',
|
||||||
elif host_system == 'netbsd'
|
'darwin': 'osx',
|
||||||
platform = 'netbsd'
|
'cygwin': 'cygwin',
|
||||||
elif host_system == 'openbsd'
|
}
|
||||||
platform = 'openbsd'
|
platform = platform_map.get(host_system, 'nix')
|
||||||
elif host_system == 'darwin'
|
|
||||||
platform = 'osx'
|
|
||||||
elif host_system == 'cygwin'
|
|
||||||
platform = 'cygwin'
|
|
||||||
else
|
|
||||||
platform = 'nix'
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Configuration data
|
# Configuration data
|
||||||
conf_data = configuration_data()
|
conf_data = configuration_data()
|
||||||
|
|||||||
Reference in New Issue
Block a user