This repository has been archived by the owner on Jul 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
meson.build
74 lines (63 loc) · 2.04 KB
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# project
project('clipboard', 'c',
version : '0.1.0_alpha6',
license : 'GPL-3.0',
default_options: [ 'c_std=gnu99' ],
meson_version : '>= 0.43.0')
base_url = 'https://github.com/Obsidian-StudiosInc/'
# global arguments
add_global_arguments('-W', language : 'c')
# global variables
cc = meson.get_compiler('c')
proj = meson.project_name()
ver = meson.project_version()
chmod = join_paths(meson.source_root(), 'meson-chmod.sh')
top_inc = include_directories('.')
# dependencies
e_version = '>= 0.21.0'
efl_version = '>= 1.19.0'
edje = dependency('edje', version: efl_version)
elm = dependency('elementary', version: efl_version)
e = dependency('enlightenment', version: e_version)
has_nls = get_option('nls')
e_arch = '@0@-gnu-@1@-@2@'.format(host_machine.system(),
host_machine.cpu_family(),
e.get_pkgconfig_variable('release'))
install_nls = true
# edje_cc binary compiler tool
edje_cmd = get_option('edje-cc')
if edje_cmd == ''
edje_cmd = join_paths(edje.get_pkgconfig_variable('prefix'),
'bin', 'edje_cc')
endif
# dir locations
dir_home = get_option('homedir-install')
if dir_home == ''
dir_prefix = join_paths(e.get_pkgconfig_variable('modules'), proj)
else
dir_prefix = join_paths(dir_home, '.e/e/modules', proj)
install_nls = false
endif
dir_mod = join_paths(dir_prefix, e_arch)
# project args
add_project_arguments('-DHAVE_CONFIG_H=1', language : 'c')
if get_option('buildtype').startswith('debug')
add_project_arguments('-g', language : 'c')
endif
if has_nls
add_project_arguments('-DENABLE_NLS=1', language : 'c')
endif
# config.h
cfg = configuration_data()
cfg.set_quoted('PACKAGE' , proj)
cfg.set_quoted('PACKAGE_NAME' , proj)
cfg.set_quoted('PACKAGE_STRING' , proj + ' ' + ver)
cfg.set_quoted('PACKAGE_URL' , base_url + proj)
cfg.set_quoted('VERSION' , ver)
configure_file(output: 'config.h', configuration: cfg)
# subdirs
subdir('data')
subdir('src')
if has_nls
subdir('po')
endif