-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmeson.build
57 lines (46 loc) · 1.57 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
#### Project ####
project('wincontrol', '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('__UNUSED__', '__attribute__((unused))')
config_dir = include_directories('.')
#### 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-wincontrol.edj',
input : 'e-module-wincontrol.edc',
output : 'e-module-wincontrol.edj',
command : cmd,
install_dir: mod_install_dir,
install : true
)
#### module.desktop ####
install_data('module.desktop',
install_dir : mod_install_dir
)
#### Report ####
if meson.version().version_compare('>=0.53')
summary({'install': lib_install_dir,
}, section: 'Directories')
endif