67 lines
1.6 KiB
Meson
67 lines
1.6 KiB
Meson
|
|
#### Project ####
|
|
project('wallpaper2`', 'c',
|
|
license: 'BSD 2 clause',
|
|
meson_version: '>= 0.47.0')
|
|
|
|
gettext_domain = 'e-module-' + meson.project_name()
|
|
|
|
|
|
#### Enlightenemnt ####
|
|
dep_e = dependency('enlightenment')
|
|
e_modules_dir = dep_e.get_pkgconfig_variable('modules')
|
|
e_release = dep_e.get_pkgconfig_variable('release')
|
|
|
|
|
|
#### Host arch ####
|
|
host_os = host_machine.system()
|
|
if host_os == 'linux'
|
|
cc = meson.get_compiler('c')
|
|
if cc.has_header_symbol('features.h', '__UCLIBC__')
|
|
host_os = 'linux-uclibc'
|
|
elif cc.has_header_symbol('features.h', '__dietlibc__')
|
|
host_os = 'linux-dietlibc'
|
|
else
|
|
host_os = 'linux-gnu'
|
|
endif
|
|
endif
|
|
mod_arch = '@0@-@1@-@2@'.format(host_os, host_machine.cpu_family(), e_release)
|
|
|
|
|
|
#### Install dirs ####
|
|
mod_install_dir = join_paths(e_modules_dir, meson.project_name())
|
|
lib_install_dir = join_paths(mod_install_dir, mod_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('.')
|
|
|
|
|
|
#### i18n ####
|
|
dep_intl = []
|
|
if get_option('nls')
|
|
config_h.set('HAVE_GETTEXT', '1')
|
|
dep_intl = cc.find_library('intl', required : false)
|
|
subdir('po')
|
|
endif
|
|
|
|
|
|
#### Edje cc ####
|
|
edje_cc = find_program('edje_cc')
|
|
|
|
|
|
#### module sources ####
|
|
subdir('src')
|
|
|
|
#### write config file ####
|
|
configure_file(output: 'config.h', configuration: config_h)
|
|
|
|
|
|
#### Data files ####
|
|
install_data('module.desktop', install_dir: mod_install_dir)
|
|
|