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 10
/
meson.build
114 lines (101 loc) · 3.56 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# project
project('entrance', 'c',
version : '3.0.0_alpha6',
license : 'GPL-3.0',
default_options: [ 'c_std=gnu99' ],
meson_version : '>= 0.40.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
efl_version = '>= 1.19.0'
crypt = cc.find_library('crypt')
deps = dependency('elementary', version: efl_version)
ecore_x = dependency('ecore-x', version: efl_version)
edje = dependency('edje', version: efl_version)
xcb = dependency('xcb')
has_pam = get_option('pam')
has_ck = get_option('consolekit')
has_nls = get_option('nls')
has_logind = get_option('logind')
if has_pam
pam_dep = cc.find_library('pam')
pam_inc = include_directories('/usr/include/security')
endif
##### 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_prefix = get_option('prefix')
dir_cache = join_paths(dir_prefix, get_option('cachedir'), proj)
dir_lib = join_paths(dir_prefix, get_option('libdir'), proj)
dir_data = join_paths(dir_prefix, get_option('datadir'))
dir_sbin = join_paths(dir_prefix, get_option('sbindir'))
dir_syscfg = join_paths(dir_prefix, get_option('sysconfdir'))
# project args
add_project_arguments('-DHAVE_CONFIG_H=1', language : 'c')
if get_option('buildtype').startswith('debug')
add_project_arguments('-g',
'-fprofile-arcs',
'-ftest-coverage',
language : 'c')
add_project_link_arguments('-fprofile-arcs',
'-ftest-coverage',
language : 'c')
endif
# config.h
cfg = configuration_data()
cfg.set_quoted('PACKAGE' , proj)
cfg.set_quoted('PACKAGE_CACHE' , dir_cache)
cfg.set_quoted('PACKAGE_STRING' , proj + ' ' + ver)
cfg.set_quoted('PACKAGE_BIN_DIR' , dir_lib)
cfg.set_quoted('PACKAGE_DATA_DIR' , join_paths(dir_data, proj))
cfg.set_quoted('PACKAGE_LIB_DIR' , dir_lib)
cfg.set_quoted('PACKAGE_SBIN_DIR' , dir_sbin)
cfg.set_quoted('SYSTEM_CONFIG_DIR' , dir_syscfg)
cfg.set_quoted('VERSION' , ver)
cfg.set('SYSTEM_CONFIG_DIR2' , dir_syscfg)
cfg.set('ENABLE_NLS', has_nls)
cfg.set('HAVE_ALLOCA_H', cc.has_header('alloca.h'))
cfg.set('HAVE_CONSOLEKIT', has_ck)
cfg.set('HAVE_LOGIND', has_logind)
cfg.set('HAVE_PAM', has_pam)
configure_file(output: 'config.h', configuration: cfg)
configure_file(input : 'data/entrance.conf.in',
output : 'entrance.conf',
install_dir : join_paths(dir_syscfg, proj),
configuration : cfg
)
if has_logind
configure_file(input : 'data/entrance.service.in',
output : 'entrance.service',
install_dir : '/usr/lib/systemd/system' ,
configuration : cfg
)
endif
if has_pam
configure_file(input : 'data/entrance.pam.d',
output : 'entrance',
install_dir : join_paths(dir_syscfg, 'pam.d'),
configuration : cfg
)
endif
install_data(sources : 'data/Xsession',
install_dir : join_paths(dir_syscfg, proj)
)
##### subdirs
subdir('src/bin')
subdir('src/daemon')
subdir('data/themes/default')
if has_nls
subdir('po')
endif