2020-04-19 01:06:07 -07:00
|
|
|
|
|
|
|
#### Project ####
|
|
|
|
project('places', 'c',
|
|
|
|
version: '0.2.0',
|
|
|
|
license: 'GPL v3',
|
2023-12-09 22:46:09 -08:00
|
|
|
meson_version: '>= 0.58.0')
|
2020-04-19 01:06:07 -07:00
|
|
|
|
|
|
|
gettext_domain = 'e-module-' + meson.project_name()
|
|
|
|
|
|
|
|
|
|
|
|
#### Enlightenemnt ####
|
|
|
|
dep_e = dependency('enlightenment', version: '>= 0.23.99')
|
2023-12-09 22:46:09 -08:00
|
|
|
e_modules_dir = dep_e.get_variable('modules')
|
|
|
|
e_release = dep_e.get_variable('release')
|
|
|
|
e_module_arch = dep_e.get_variable('module_arch')
|
2020-04-19 01:06:07 -07:00
|
|
|
|
|
|
|
|
|
|
|
#### 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_dir = include_directories('.')
|
|
|
|
|
|
|
|
|
2021-04-18 04:38:58 -07:00
|
|
|
#### Udisks2 support ####
|
|
|
|
if get_option('udisks2') == true
|
|
|
|
dependency('udisks2', required: true, version: '>= 2.7.2')
|
|
|
|
config_h.set('PLACES_HAVE_UDISKS2', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2020-04-19 01:06:07 -07:00
|
|
|
#### Udisks1 support ####
|
|
|
|
if get_option('udisks') == true
|
|
|
|
dependency('udisks', required: true)
|
2021-04-23 00:11:24 -07:00
|
|
|
config_h.set('PLACES_HAVE_UDISKS1', 1)
|
2020-04-19 01:06:07 -07:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
#### fstab/mtab/mount support ####
|
|
|
|
if get_option('mount') == true
|
|
|
|
# TODO here check if /etc/fstab and /proc/mounts exists
|
|
|
|
config_h.set('PLACES_HAVE_MOUNT', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2021-04-21 22:58:40 -07:00
|
|
|
#### EXPERIMENTAL eeze support ####
|
2020-04-19 01:06:07 -07:00
|
|
|
if get_option('eeze') == true
|
|
|
|
dependency('eeze', required: true)
|
|
|
|
config_h.set('PLACES_HAVE_EEZE', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2021-04-21 22:58:40 -07:00
|
|
|
#### EXPERIMENTAL systemd support ####
|
|
|
|
if get_option('systemd') == true
|
|
|
|
dependency('systemd', required: true,)
|
|
|
|
config_h.set('PLACES_HAVE_SYSTEMD', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2020-04-19 01:06:07 -07:00
|
|
|
#### 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')
|
2023-12-09 22:46:09 -08:00
|
|
|
endif
|
2020-04-19 01:06:07 -07:00
|
|
|
|
|
|
|
|
|
|
|
#### Edje cc ####
|
|
|
|
edje_cc = find_program('edje_cc')
|
|
|
|
|
|
|
|
|
|
|
|
#### module sources ####
|
|
|
|
subdir('src')
|
|
|
|
|
|
|
|
|
|
|
|
#### write config file ####
|
|
|
|
configure_file(output: 'places_config.h', configuration: config_h)
|
|
|
|
|
|
|
|
|
|
|
|
#### Data files ####
|
|
|
|
install_data('module.desktop', install_dir: mod_install_dir)
|
|
|
|
|
|
|
|
cmd = [ edje_cc,
|
2023-12-09 22:46:09 -08:00
|
|
|
'-id', join_paths(meson.project_source_root(), 'images'),
|
2020-04-19 01:06:07 -07:00
|
|
|
'@INPUT@', '@OUTPUT@']
|
|
|
|
custom_target('e-module-places.edj',
|
|
|
|
input : 'e-module-places.edc',
|
|
|
|
output : 'e-module-places.edj',
|
|
|
|
command : cmd,
|
|
|
|
install_dir: mod_install_dir,
|
|
|
|
install : true
|
|
|
|
)
|
2021-04-18 04:38:58 -07:00
|
|
|
|
|
|
|
|
|
|
|
#### Report ####
|
|
|
|
if meson.version().version_compare('>=0.53')
|
|
|
|
summary({'install': lib_install_dir,
|
|
|
|
}, section: 'Directories')
|
|
|
|
summary({'udisks2': get_option('udisks2'),
|
|
|
|
'udisks1': get_option('udisks'),
|
|
|
|
'mount': get_option('mount'),
|
2021-04-21 22:58:40 -07:00
|
|
|
}, section: 'Backends', bool_yn: true)
|
|
|
|
summary({'eeze': get_option('eeze'),
|
|
|
|
'systemd': get_option('systemd'),
|
|
|
|
}, section: 'Experimental Backends', bool_yn: true)
|
2021-04-18 04:38:58 -07:00
|
|
|
endif
|