Skip to content
Snippets Groups Projects
Commit 3aec06bb authored by Bruce Cowan's avatar Bruce Cowan
Browse files

Some build system tidying

parent 835245c1
No related branches found
No related tags found
No related merge requests found
# SPDX-FileCopyrightText: 2016, 2018 Bruce Cowan <bruce@bcowan.me.uk>
# SPDX-License-Identifier: CC0-1.0
gnome = import('gnome')
resources = gnome.compile_resources('gen-resources',
'rugby.gresource.xml',
source_dir: 'data')
# SPDX-FileCopyrightText: 2016-2019 Bruce Cowan <bruce@bcowan.me.uk>
# SPDX-FileCopyrightText: 2016-2020 Bruce Cowan <bruce@bcowan.me.uk>
# SPDX-License-Identifier: CC0-1.0
project('rugby', 'c',
license:'GPL')
project('rugby', 'c', license:'GPL', meson_version: '>=0.45.0')
gnome = import('gnome')
add_project_arguments('-Wdeprecated-declarations', language: 'c')
add_project_arguments('-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_46', language: 'c')
add_project_arguments('-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_46', language: 'c')
add_project_arguments('-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_16', language: 'c')
add_project_arguments('-DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_16', language: 'c')
gio_dep = dependency('gio-2.0', version: '>= 2.46')
gtk_dep = dependency('gtk+-3.0', version: '>= 3.16')
gio_dep = dependency('gio-2.0', version: '>=2.46')
gtk_dep = dependency('gtk+-3.0', version: '>=3.16')
conf = configuration_data()
conf.set('TRY_POINTS', get_option('try_points'))
conf.set('UTRY_POINTS', get_option('utry_points'))
conf.set('KICK_POINTS', get_option('kick_points'))
git = find_program('git', required: false)
if git.found()
VERSION = run_command('git', 'describe', '--always').stdout().strip()
else
VERSION = 'unknown'
endif
conf.set_quoted('VERSION', VERSION)
subdir('data')
subdir('src')
# SPDX-FileCopyrightText: 2018, 2019 Bruce Cowan <bruce@bcowan.me.uk>
# SPDX-FileCopyrightText: 2018-2020 Bruce Cowan <bruce@bcowan.me.uk>
# SPDX-License-Identifier: CC0-1.0
option('try_points', type: 'string', value: '7')
option('utry_points', type: 'string', value: '5')
option('kick_points', type: 'string', value: '3')
option('try_points', type: 'integer', value: 7)
option('utry_points', type: 'integer', value: 5)
option('kick_points', type: 'integer', value: 3)
......@@ -33,7 +33,7 @@ about_activated (GSimpleAction *simple,
"license-type", GTK_LICENSE_GPL_3_0,
"authors", authors,
"comments", "Rugby scores possiblities program",
"version", PACKAGE_VERSION,
"version", VERSION,
NULL);
}
......
# SPDX-FileCopyrightText: 2016-2020 Bruce Cowan <bruce@bcowan.me.uk>
# SPDX-License-Identifier: CC0-1.0
gnome = import('gnome')
conf = configuration_data()
conf.set('TRY_POINTS', get_option('try_points'))
conf.set('UTRY_POINTS', get_option('utry_points'))
conf.set('KICK_POINTS', get_option('kick_points'))
VCS_TAG = ''
COPYRIGHT_YEAR = '?'
git = find_program('git', required: false)
if git.found()
VCS_TAG = run_command('git', 'describe', '--always').stdout().strip()
else
VCS_TAG = 'unknown'
endif
conf.set_quoted('PACKAGE_VERSION', VCS_TAG)
conf.set_quoted('COPYRIGHT_YEAR', COPYRIGHT_YEAR)
config_h = configure_file(configuration: conf, output: 'config.h')
sources = files(
sources = [
'main.c',
'rugby-app-window.c',
'rugby-list-store.c',
'rugby-possibility.c',
'rugby-possibility-widget.c'
)
]
sources += config_h
sources += resources
deps = [gio_dep, gtk_dep]
config_h = configure_file(configuration: conf, output: 'config.h')
executable('rugby',
sources,
dependencies: deps,
sources, resources, config_h,
dependencies: [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