meson: Minor cleanup

This commit is contained in:
Kenny Levinsen 2021-03-16 12:53:39 +01:00
parent e802d381a1
commit 75cb20e891

View file

@ -16,11 +16,9 @@ libseat_soversion = 1
defaultpath = get_option('defaultpath') defaultpath = get_option('defaultpath')
if defaultpath == '' if defaultpath == ''
system = target_machine.system()
if system == 'linux'
defaultpath = '/run/seatd.sock'
else
defaultpath = '/var/run/seatd.sock' defaultpath = '/var/run/seatd.sock'
if target_machine.system() == 'linux'
defaultpath = '/run/seatd.sock'
endif endif
endif endif
@ -51,6 +49,10 @@ if ['debugoptimized', 'release', 'minsize'].contains(get_option('buildtype'))
add_project_arguments('-D_FORTIFY_SOURCE=2', language: 'c') add_project_arguments('-D_FORTIFY_SOURCE=2', language: 'c')
endif endif
if get_option('buildtype').startswith('debug')
add_project_arguments('-DDEBUG', language : 'c')
endif
# Hacks # Hacks
source_root = meson.current_source_dir().split('/') source_root = meson.current_source_dir().split('/')
build_root = meson.build_root().split('/') build_root = meson.build_root().split('/')
@ -74,11 +76,6 @@ foreach p : source_root
i += 1 i += 1
endforeach endforeach
if get_option('buildtype').startswith('debug')
add_project_arguments('-DDEBUG', language : 'c')
endif
add_project_arguments( add_project_arguments(
'-DREL_SRC_DIR="@0@"'.format(join_paths(relative_dir_parts) + '/'), '-DREL_SRC_DIR="@0@"'.format(join_paths(relative_dir_parts) + '/'),
language: 'c', language: 'c',
@ -208,12 +205,9 @@ endif
if scdoc.found() if scdoc.found()
sh = find_program('sh', native: true) sh = find_program('sh', native: true)
scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true) scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true)
man_pages = ['seatd.1.scd']
mandir = get_option('mandir') mandir = get_option('mandir')
foreach src : man_pages foreach src : ['seatd.1.scd']
topic = src.split('.')[0] topic = src.split('.')[0]
section = src.split('.')[1] section = src.split('.')[1]
output = '@0@.@1@'.format(topic, section) output = '@0@.@1@'.format(topic, section)