meson format

just the defaults
This commit is contained in:
psykose 2024-10-15 22:51:13 +02:00
parent 70dcd57194
commit 16d9c54bb0
5 changed files with 58 additions and 46 deletions

View file

@ -3,11 +3,11 @@ application_id = 'eu.callcc.audrey'
scalable_dir = 'hicolor' / 'scalable' / 'apps'
install_data(
scalable_dir / ('@0@.svg').format(application_id),
install_dir: get_option('datadir') / 'icons' / scalable_dir
install_dir: get_option('datadir') / 'icons' / scalable_dir,
)
symbolic_dir = 'hicolor' / 'symbolic' / 'apps'
install_data(
symbolic_dir / ('@0@-symbolic.svg').format(application_id),
install_dir: get_option('datadir') / 'icons' / symbolic_dir
install_dir: get_option('datadir') / 'icons' / symbolic_dir,
)

View file

@ -4,7 +4,7 @@ desktop_file = i18n.merge_file(
type: 'desktop',
po_dir: '../po',
install: true,
install_dir: get_option('datadir') / 'applications'
install_dir: get_option('datadir') / 'applications',
)
desktop_utils = find_program('desktop-file-validate', required: false)
@ -17,21 +17,31 @@ appstream_file = i18n.merge_file(
output: 'eu.callcc.audrey.metainfo.xml',
po_dir: '../po',
install: true,
install_dir: get_option('datadir') / 'metainfo'
install_dir: get_option('datadir') / 'metainfo',
)
appstreamcli = find_program('appstreamcli', required: false, disabler: true)
test('Validate appstream file', appstreamcli,
args: ['validate', '--no-net', '--explain', appstream_file])
install_data('eu.callcc.audrey.gschema.xml',
install_dir: get_option('datadir') / 'glib-2.0' / 'schemas'
test(
'Validate appstream file',
appstreamcli,
args: ['validate', '--no-net', '--explain', appstream_file],
)
compile_schemas = find_program('glib-compile-schemas', required: false, disabler: true)
test('Validate schema file',
install_data(
'eu.callcc.audrey.gschema.xml',
install_dir: get_option('datadir') / 'glib-2.0' / 'schemas',
)
compile_schemas = find_program(
'glib-compile-schemas',
required: false,
disabler: true,
)
test(
'Validate schema file',
compile_schemas,
args: ['--strict', '--dry-run', meson.current_source_dir()])
args: ['--strict', '--dry-run', meson.current_source_dir()],
)
service_conf = configuration_data()
@ -40,7 +50,7 @@ configure_file(
input: 'eu.callcc.audrey.service.in',
output: 'eu.callcc.audrey.service',
configuration: service_conf,
install_dir: get_option('datadir') / 'dbus-1' / 'services'
install_dir: get_option('datadir') / 'dbus-1' / 'services',
)
subdir('icons')

View file

@ -1,7 +1,9 @@
project('audrey', ['c', 'vala'],
project(
'audrey',
['c', 'vala'],
version: '0.1.0', # AUDREY_VERSION
meson_version: '>= 1.0.0',
default_options: [ 'warning_level=0', 'werror=false', ],
default_options: ['warning_level=0', 'werror=false'],
)
i18n = import('i18n')
@ -20,7 +22,10 @@ configure_file(output: 'config.h', configuration: config_h)
config_dep = valac.find_library('config', dirs: srcdir)
config_inc = include_directories('.')
add_project_arguments('-DGETTEXT_PACKAGE="' + meson.project_name () + '"', language: 'c')
add_project_arguments(
'-DGETTEXT_PACKAGE="' + meson.project_name() + '"',
language: 'c',
)
subdir('data')

1
meson.format Normal file
View file

@ -0,0 +1 @@
indent_by = ' '

View file

@ -20,17 +20,10 @@ audrey_deps = [
dependency('sqlite3'),
]
blueprints = custom_target('blueprints',
input: files(
'ui/play_queue.blp',
'ui/setup.blp',
'ui/window.blp',
),
output: [
'play_queue.ui',
'setup.ui',
'window.ui',
],
blueprints = custom_target(
'blueprints',
input: files('ui/play_queue.blp', 'ui/setup.blp', 'ui/window.blp'),
output: ['play_queue.ui', 'setup.ui', 'window.ui'],
command: [
find_program('blueprint-compiler'),
'batch-compile',
@ -40,13 +33,16 @@ blueprints = custom_target('blueprints',
],
)
audrey_sources += gnome.compile_resources('audrey-resources',
audrey_sources += gnome.compile_resources(
'audrey-resources',
'audrey.gresource.xml',
c_name: 'audrey',
dependencies: blueprints,
)
executable('audrey', audrey_sources,
executable(
'audrey',
audrey_sources,
dependencies: audrey_deps,
include_directories: config_inc,
install: true,