project('forecasts', 'c') e = dependency('enlightenment') dir_module_e = e.get_pkgconfig_variable('modules') release = e.get_pkgconfig_variable('release') host_os = host_machine.system() cc = meson.get_compiler('c') if host_os == 'linux' 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 module_arch = '@0@-@1@-@2@'.format(host_os, host_machine.cpu_family(), release) edje_cmd = find_program('edje_cc') install_mod_dir = join_paths(dir_module_e, meson.project_name()) install_dir = join_paths(install_mod_dir, module_arch) locale_dir = join_paths(get_option('prefix'), get_option('localedir')) config_data = configuration_data() config_data.set_quoted('PACKAGE', meson.project_name()) config_data.set_quoted('MODULE_DIR', install_dir) config_data.set_quoted('LOCALE_DIR', locale_dir) config_dir = include_directories('.') use_translations = false intl_lib = cc.find_library('intl', required: false) if intl_lib.found() config_data.set('ENABLE_NLS', 1) use_translations = true else gettext_code = ''' #include int main(int argc, char *argv[]) { (void)ngettext("", "", 0); return 0; } ''' if cc.links(gettext_code) config_data.set('ENABLE_NLS', 1) use_translations = true endif endif subdir('src') configure_file(output: 'forecast_config.h', install: false, configuration: config_data) install_data('module.desktop', install_dir : install_mod_dir) cmd = [ edje_cmd, '-id', join_paths(meson.source_root(), 'images'), '@INPUT@', '@OUTPUT@' ] custom_target('e-module-forecasts.edj', input : 'e-module-forecasts.edc', output : 'e-module-forecasts.edj', command : cmd, install_dir: install_mod_dir, install : true ) custom_target('forecasts.edj', input : 'forecasts.edc', output : 'forecasts.edj', command : cmd, install_dir: install_mod_dir, install : true ) if use_translations subdir('po') endif subdir('places')