#### Project #### project('edgar', 'c', version: '0.4.0', license: 'GPL v3', meson_version: '>= 0.58.0') # NOTE: meson 51 needed for the 'modules' param of pymod.find_installation() # NOTE: meson 53 needed for the 'embed' param of py3.dependency() #### EFL #### dep_efl = dependency('efl', version: '>= 1.24') #### Enlightenemnt #### dep_e = dependency('enlightenment', version: '>= 0.23.99') e_modules_dir = dep_e.get_variable('modules') e_lib_dir = dep_e.get_variable('libdir') e_release = dep_e.get_variable('release') e_module_arch = dep_e.get_variable('module_arch') #### Dlopen #### cc = meson.get_compiler('c') dep_dl = cc.find_library('dl', required: false) #### Python3 #### py3 = import('python').find_installation('python3', modules: ['efl', 'dbus']) dep_py3 = py3.dependency(embed: true) ## bytecompile command to be used by gadgets py3_bytecompile = [py3, meson.project_source_root() / 'meson_bytecompile.py', '@INPUT@', '@OUTPUT@'] ## find the installed libpython soname, will be dlopened at runtime py_instsoname = py3.get_variable('INSTSONAME') #### Install dirs #### mod_install_dir = join_paths(e_modules_dir, meson.project_name()) lib_install_dir = join_paths(mod_install_dir, e_module_arch) gadgets_install_dir = join_paths(e_lib_dir, 'enlightenment', 'edgar_gadgets') #### Config.h #### config_h = configuration_data() config_h.set_quoted('PACKAGE', meson.project_name()) config_h.set_quoted('PYINSTSONAME', py_instsoname) config_dir = include_directories('.') #### Edje cc #### edje_cc = find_program('edje_cc') #### Edgar sources #### subdir('src') #### Gadgets #### subdir('gadgets/audio') subdir('gadgets/calculator') subdir('gadgets/cpu') subdir('gadgets/dropbox') subdir('gadgets/led_clock') subdir('gadgets/mem') subdir('gadgets/netspeed') #### Write config.h #### configure_file(output: 'edgar_config.h', configuration: config_h) #### Data files #### install_data('python/e.py', install_dir: gadgets_install_dir) install_data('module.desktop', install_dir: mod_install_dir) cmd = [edje_cc, '-id', meson.project_source_root(), '@INPUT@', '@OUTPUT@'] custom_target('e-module-edgar.edj', input : 'e-module-edgar.edc', output : 'e-module-edgar.edj', command : cmd, install_dir: mod_install_dir, install : true )