Meson: Use configuration_data.

Meson makes this much easier and prettier. Generate a configure
file for future use.
This commit is contained in:
Alastair Poole 2019-12-10 23:17:16 +00:00
parent 6be13a1268
commit c66ef78497
3 changed files with 27 additions and 12 deletions

View File

@ -1,9 +1,12 @@
##### Project
project('evisum', 'c',
version: '0.3.0',
versioni : '0.3.0',
meson_version : '>= 0.40.0')
efl_version = '>= 1.22.0'
cfg = configuration_data()
host_os = host_machine.system()
deps = dependency('elementary', version: efl_version)
@ -20,5 +23,10 @@ dir_lib = join_paths(dir_prefix, get_option('libdir'))
dir_data = join_paths(dir_prefix, get_option('datadir'))
dir_locale = join_paths(dir_prefix, get_option('localedir'))
##### config.h
cfg.set_quoted('PACKAGE_VERSION', meson.project_version())
configure_file(output: 'config.h', configuration: cfg)
subdir('src')
subdir('data')

View File

@ -6,8 +6,7 @@
* See LICENSE file for details.
*/
#define VERSION "0.2.6"
#include "config.h"
#include "ui.h"
static void

View File

@ -1,9 +1,17 @@
inc = include_directories('.', '../..')
executable('evisum', [
'disks.c', 'disks.h',
'process.c', 'process.h',
'system.c', 'system.h',
'ui.c', 'ui.h',
'main.c'],
'disks.c',
'disks.h',
'process.c',
'process.h',
'system.c',
'system.h',
'ui.c',
'ui.h',
'main.c'
],
include_directories : inc,
dependencies : [ deps, deps_os ],
gui_app : true,
install : true)