From 4fd81442d2849b12998d5bcf1b1e394820ab90a3 Mon Sep 17 00:00:00 2001 From: Bruce Cowan <bruce@bcowan.eu> Date: Sun, 31 Dec 2017 00:30:46 +0000 Subject: [PATCH] Some meson changes --- meson.build | 13 +------------ src/meson.build | 24 +++++++++++++++--------- 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/meson.build b/meson.build index 75086ff..f939703 100644 --- a/meson.build +++ b/meson.build @@ -1,15 +1,4 @@ -project('rugby', 'c', - default_options: [ - 'buildtype=debugoptimized', - 'c_std=gnu11', - 'warning_level=1' - ]) - -add_global_arguments(['-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_38', - '-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_16', - '-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_38', - '-DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_16'], - language: 'c') +project('rugby', 'c') subdir('src') subdir('data') diff --git a/src/meson.build b/src/meson.build index 508d26d..123ef0e 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,14 +1,20 @@ gnome = import('gnome') -res = gnome.compile_resources('gen-resources', '../data/rugby.gresource.xml', source_dir: '../data') +sources = files( + 'rugby.c', + 'rugby-application.c', + 'rugby-cell-renderer-score.c', + 'rugby-score-store.c', + 'rugby-scoring.c' +) -gtk = dependency('gtk+-3.0', version : '>= 3.16') +sources += gnome.compile_resources('gen-resources', + '../data/rugby.gresource.xml', + source_dir: '../data') -src = ['rugby.c', - 'rugby-application.c', - 'rugby-cell-renderer-score.c', - 'rugby-score-store.c', - 'rugby-scoring.c', - res] +gtk = dependency('gtk+-3.0', version : '>= 3.16') -executable('rugby', src, dependencies : gtk) +executable('rugby', + sources, + dependencies: gtk, + install: true) -- GitLab