meson build - simplify wizard module build like others

This commit is contained in:
Carsten Haitzler 2017-08-12 12:25:53 +09:00
parent 1d90c87334
commit 397e21d0de
2 changed files with 42 additions and 61 deletions

View File

@ -4,16 +4,11 @@ module_includes = [ '../../..', '../../bin', '../../bin/efx' ]
module_includes2 = [ '../..' , '../bin' , '../bin/efx' ]
module_deps = [ deps_e, dep_dl ]
subdir('wizard')
subdir('mixer')
subdir('everything')
mods = [
# standard run of the mill modules with cion and desktop
'battery',
'cpufreq',
'clock',
'sysinfo',
'ibar',
'pager',
'pager_plain',
@ -55,6 +50,13 @@ mods = [
'time',
'luncher',
'teamwork',
# modules have a custom binary as well
'battery',
'cpufreq',
'clock',
'sysinfo',
# custyom sub modules and custom data
'wizard',
# also standard modules, just with only a desktop file using a generic icon
'conf_theme',
'conf_intl',

View File

@ -1,72 +1,51 @@
module = 'wizard'
opt = 'wizard'
conf = 'USE_MODULE_WIZARD'
src = files(
'e_mod_main.c',
'e_wizard.c',
'e_wizard.h'
)
pages = [
'page_000',
'page_010',
'page_011',
'page_020',
'page_030',
'page_040',
'page_050',
'page_060',
'page_065',
'page_070',
'page_080',
'page_090',
'page_100',
'page_110',
'page_120',
'page_130',
'page_150',
'page_160',
'page_170',
'page_180',
'page_200'
]
ibar_def = [
'data/def-ibar.txt'
]
desktops = [
'data/desktop/home.desktop',
'data/desktop/root.desktop',
'data/desktop/tmp.desktop'
]
dir_mod = join_paths(dir_module_e, module)
dir_mod_bin = join_paths(dir_mod, module_arch)
if get_option(opt) == true
config_h.set(conf, '1')
module_files += join_paths(dir_mod_bin, module + '.so')
install_data(ibar_def, install_dir: dir_mod)
install_data(desktops, install_dir: join_paths(dir_mod, 'desktop'))
shared_module(module, src,
include_directories: include_directories(module_includes),
name_prefix : '',
dependencies : module_deps,
install_dir : dir_mod_bin,
install : true
)
if get_option(m) == true
pages = [
'page_000',
'page_010',
'page_011',
'page_020',
'page_030',
'page_040',
'page_050',
'page_060',
'page_065',
'page_070',
'page_080',
'page_090',
'page_100',
'page_110',
'page_120',
'page_130',
'page_150',
'page_160',
'page_170',
'page_180',
'page_200'
]
foreach page: pages
shared_module(page, '@0@.c'.format(page),
include_directories: include_directories(module_includes),
name_prefix : '',
dependencies : module_deps,
install_dir : dir_mod_bin,
install_dir : _dir_bin,
install : true
)
endforeach
data = [
'data/def-ibar.txt'
]
install_data(['data/desktop/home.desktop',
'data/desktop/root.desktop',
'data/desktop/tmp.desktop'],
install_dir: join_paths(_dir, 'desktop'))
no_icon = true
endif