diff options
author | Alexander Mikhaylenko <alexm@gnome.org> | 2020-03-30 22:48:29 +0500 |
---|---|---|
committer | Alexander Mikhaylenko <alexm@gnome.org> | 2020-03-30 22:48:29 +0500 |
commit | 5dbe605c879cde0506d0908203ae0736a4aec29f (patch) | |
tree | 29320f3f5c0cf402173a0121a2bd23b5b1222a59 | |
parent | 02a7e73a064103e639173e348157c94ee68efc78 (diff) | |
download | gnome-screenshot-5dbe605c879cde0506d0908203ae0736a4aec29f.tar.gz |
meson: Reformat
-rw-r--r-- | data/icons/meson.build | 5 | ||||
-rw-r--r-- | data/meson.build | 85 | ||||
-rw-r--r-- | meson.build | 32 | ||||
-rw-r--r-- | src/meson.build | 37 |
4 files changed, 101 insertions, 58 deletions
diff --git a/data/icons/meson.build b/data/icons/meson.build index 21f90da..ad3e16f 100644 --- a/data/icons/meson.build +++ b/data/icons/meson.build @@ -1 +1,4 @@ -install_subdir('hicolor', install_dir : join_paths(gnome_screenshot_datadir, 'icons')) +install_subdir( + 'hicolor', + install_dir: join_paths(gnome_screenshot_datadir, 'icons') +) diff --git a/data/meson.build b/data/meson.build index 07da886..fd570b3 100644 --- a/data/meson.build +++ b/data/meson.build @@ -1,12 +1,14 @@ gnome = import('gnome') -desktop_file = i18n.merge_file('desktop', - type: 'desktop', - input: 'org.gnome.Screenshot.desktop.in', - output: 'org.gnome.Screenshot.desktop', - po_dir: join_paths(meson.current_source_dir(), '../po'), - install: true, - install_dir: gnome_screenshot_appsdir) +desktop_file = i18n.merge_file( + 'desktop', + type: 'desktop', + input: 'org.gnome.Screenshot.desktop.in', + output: 'org.gnome.Screenshot.desktop', + po_dir: join_paths(meson.current_source_dir(), '../po'), + install: true, + install_dir: gnome_screenshot_appsdir +) # Validate Desktop file desktop_file_validate = find_program('desktop-file-validate', required: false) @@ -20,57 +22,68 @@ if desktop_file_validate.found() ) endif - -metainfo_file = i18n.merge_file('appdata', - input: 'org.gnome.Screenshot.metainfo.xml.in', - output: 'org.gnome.Screenshot.metainfo.xml', - po_dir: join_paths(meson.current_source_dir(), '../po'), - install: true, - install_dir: gnome_screenshot_appdatadir) +metainfo_file = i18n.merge_file( + 'appdata', + input: 'org.gnome.Screenshot.metainfo.xml.in', + output: 'org.gnome.Screenshot.metainfo.xml', + po_dir: join_paths(meson.current_source_dir(), '../po'), + install: true, + install_dir: gnome_screenshot_appdatadir +) # Validate metainfo appstream_util = find_program('appstream-util', required: false) if appstream_util.found() test( - 'validate-metainfo', appstream_util, + 'validate-metainfo', + appstream_util, args: [ - 'validate', '--nonet', metainfo_file.full_path() + 'validate', + '--nonet', + metainfo_file.full_path() ] ) endif - -service_conf = configuration_data () +service_conf = configuration_data() service_conf.set('bindir', gnome_screenshot_bindir) -configure_file(input: 'org.gnome.Screenshot.service.in', - output: 'org.gnome.Screenshot.service', - configuration: service_conf, - install: true, - install_dir: gnome_screenshot_servicesdir) +configure_file( + input: 'org.gnome.Screenshot.service.in', + output: 'org.gnome.Screenshot.service', + configuration: service_conf, + install: true, + install_dir: gnome_screenshot_servicesdir +) -install_data('org.gnome.gnome-screenshot.gschema.xml', - install_dir: gnome_screenshot_schemadir) +install_data( + 'org.gnome.gnome-screenshot.gschema.xml', + install_dir: gnome_screenshot_schemadir +) glib_compile_schemas = find_program('glib-compile-schemas', required: false) # Validata GSchema if glib_compile_schemas.found() test( - 'validate-gschema', glib_compile_schemas, + 'validate-gschema', + glib_compile_schemas, args: [ - '--strict', '--dry-run', meson.current_source_dir() + '--strict', + '--dry-run', + meson.current_source_dir() ] ) endif +resources = gnome.compile_resources( + 'screenshot-resources', + 'org.gnome.Screenshot.gresource.xml', + source_dir: '.', + c_name: 'screenshot' +) -resources = gnome.compile_resources('screenshot-resources', - 'org.gnome.Screenshot.gresource.xml', - source_dir: '.', - c_name: 'screenshot') - - -install_data('gnome-screenshot.1', - install_dir: join_paths(get_option('mandir'), 'man1')) +install_data( + 'gnome-screenshot.1', + install_dir: join_paths(get_option('mandir'), 'man1') +) -# Subdirectories subdir('icons') diff --git a/meson.build b/meson.build index c09c539..016f8dd 100644 --- a/meson.build +++ b/meson.build @@ -1,14 +1,21 @@ -project('gnome-screenshot', 'c', - version: '3.34.0', - license: 'GPLv2+', - meson_version: '>= 0.50.0', - default_options: [ - 'buildtype=debugoptimized', - 'warning_level=1', - 'c_std=c99', - ]) - -add_project_arguments([ '-D_POSIX_C_SOURCE=200809L', '-D_XOPEN_SOURCE=700', '-D_DEFAULT_SOURCE' ], language: 'c') +project( + 'gnome-screenshot', + 'c', + version: '3.34.0', + license: 'GPLv2+', + meson_version: '>= 0.50.0', + default_options: [ + 'buildtype=debugoptimized', + 'warning_level=1', + 'c_std=c99', + ] +) + +add_project_arguments([ + '-D_POSIX_C_SOURCE=200809L', + '-D_XOPEN_SOURCE=700', + '-D_DEFAULT_SOURCE' +], language: 'c') cc = meson.get_compiler('c') @@ -26,7 +33,8 @@ glib_req_version = '>= 2.35.1' gtk_req_version = '>= 3.12.0' mathlib_dep = cc.find_library('m', required: false) -x11_dep = [ dependency('x11'), dependency('xext') ] +x11_dep = dependency('x11') +xext_dep = dependency('xext') glib_dep = dependency('glib-2.0', version: glib_req_version) gtk_dep = dependency('gtk+-3.0', version: gtk_req_version) canberra_dep = dependency('libcanberra-gtk3') diff --git a/src/meson.build b/src/meson.build index 6335614..caca42f 100644 --- a/src/meson.build +++ b/src/meson.build @@ -13,12 +13,31 @@ sources = [ 'screenshot-utils.c', ] -executable('gnome-screenshot', sources + resources, - include_directories: [ root_inc, include_directories('.') ], - dependencies: [ mathlib_dep, x11_dep, glib_dep, gtk_dep, canberra_dep ], - c_args: [ - '-DLOCALEDIR="@0@"'.format(gnome_screenshot_localedir), - '-DGLIB_DISABLE_DEPRECATION_WARNINGS', - '-DGDK_DISABLE_DEPRECATION_WARNINGS', - ], - install: true) +include_directories = [ + root_inc, + include_directories('.') +] + +dependencies = [ + mathlib_dep, + x11_dep, + xext_dep, + glib_dep, + gtk_dep, + canberra_dep +] + +c_args = [ + '-DLOCALEDIR="@0@"'.format(gnome_screenshot_localedir), + '-DGLIB_DISABLE_DEPRECATION_WARNINGS', + '-DGDK_DISABLE_DEPRECATION_WARNINGS', +] + +executable( + 'gnome-screenshot', + sources + resources, + include_directories: include_directories, + dependencies: dependencies, + c_args: c_args, + install: true +) |