Skip to content
Snippets Groups Projects
Commit 18a31edc authored by Bruce Cowan's avatar Bruce Cowan :airplane:
Browse files

Build system improvements

Add compiled schemas to the binary
Use standard VCS tagging system
parent 252b5d41
No related branches found
No related tags found
No related merge requests found
Pipeline #2833 passed
......@@ -6,7 +6,7 @@ resources = gnome.compile_resources('gen-resources',
'rugby.gresource.xml',
source_dir: 'data')
gnome.compile_schemas(
compiled_schemas = gnome.compile_schemas(
build_by_default: true,
depend_files: 'uk.me.bcowan.Rugby.gschema.xml',
)
......
......@@ -15,15 +15,17 @@ gio_dep = dependency('gio-2.0', version: '>= 2.44')
gtk_dep = dependency('gtk+-3.0', version: '>= 3.16')
conf = configuration_data()
git = find_program('git', required: false)
if git.found()
VERSION = run_command('git', 'describe', '--always').stdout().strip()
else
VERSION = meson.version()
endif
conf.set_quoted('VERSION', VERSION)
conf.set_quoted('VERSION','@VCS_TAG@')
config_h = declare_dependency(
sources: vcs_tag(
input: configure_file(
output: 'config.h.in',
configuration: conf
),
output: 'config.h',
)
)
cflags = []
cflags += ['-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_44',
......
# SPDX-FileCopyrightText: 2016-2020 Bruce Cowan <bruce@bcowan.me.uk>
#
# SPDX-License-Identifier: CC0-1.0
sources = [
'main.c',
......@@ -9,10 +10,8 @@ sources = [
'rugby-pref-window.c',
]
config_h = configure_file(configuration: conf, output: 'config.h')
executable('rugby',
sources, resources, config_h,
dependencies: [gio_dep, gtk_dep],
sources, resources, compiled_schemas,
dependencies: [config_h, gio_dep, gtk_dep],
install_dir: get_option('bindir'),
install: true)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment