forked from BodhiDev/Desktitle2.0
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
80 lines (68 loc) · 2.23 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
75
76
77
78
79
80
#### Project ####
project('desktitle', 'c',
version: '0.1.1',
meson_version: '>= 0.58.0')
add_project_arguments('-D__UNUSED__=__attribute__((unused))', language: 'c')
gettext_domain = 'e-module-' + meson.project_name()
#### Enlightenment ####
dep_e = dependency('enlightenment')
e_modules_dir = dep_e.get_variable('modules')
e_module_arch = dep_e.get_variable('module_arch')
#### Install dirs ####
mod_install_dir = join_paths(e_modules_dir, meson.project_name())
lib_install_dir = join_paths(mod_install_dir, e_module_arch)
#### config.h ####
config_h = configuration_data()
config_h.set_quoted('PACKAGE', meson.project_name())
config_h.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir')))
config_h.set_quoted('LOCALEDOMAIN', gettext_domain)
config_h.set('__UNUSED__', '__attribute__((unused))')
config_dir = include_directories('.')
#### i18n ####
dep_intl = []
if get_option('nls')
config_h.set('HAVE_GETTEXT', '1')
cc = meson.get_compiler('c')
dep_intl = cc.find_library('intl', required : false)
subdir('po')
endif
#### module.desktop ####
i18n.merge_file(
input: 'module.desktop.in',
output: 'module.desktop',
type: 'desktop',
po_dir: 'po',
install: true,
install_dir: mod_install_dir
)
#### Edje cc ####
edje_cc = get_option('edje-cc')
if edje_cc == ''
edje_cc = find_program('edje_cc')
endif
#### module sources ####
subdir('src')
#### write config file ####
configure_file(output: 'config.h', configuration: config_h)
cmd = [ edje_cc,
'-id', join_paths(meson.project_source_root(), 'images'),
'@INPUT@', '@OUTPUT@']
custom_target('e-module-desktitle.edj',
input : 'e-module-desktitle.edc',
output : 'e-module-desktitle.edj',
command : cmd,
install_dir: mod_install_dir,
install : true
)
custom_target('desktitle.edj',
input : 'desktitle.edc',
output : 'desktitle.edj',
command : cmd,
install_dir: mod_install_dir,
install : true
)
#### Report ####
if meson.version().version_compare('>=0.53')
summary({'install': lib_install_dir,
}, section: 'Directories')
endif