meson build - minimize teamwork meson build too like other modules

also simplify build if's...
This commit is contained in:
Carsten Haitzler 2017-08-12 12:00:53 +09:00
parent 94f3cc4a2a
commit 1d90c87334
4 changed files with 9 additions and 37 deletions

View File

@ -7,7 +7,6 @@ module_deps = [ deps_e, dep_dl ]
subdir('wizard')
subdir('mixer')
subdir('everything')
subdir('teamwork')
mods = [
# standard run of the mill modules with cion and desktop
@ -55,6 +54,7 @@ mods = [
'wireless',
'time',
'luncher',
'teamwork',
# also standard modules, just with only a desktop file using a generic icon
'conf_theme',
'conf_intl',

View File

@ -1,47 +1,15 @@
module = 'teamwork'
opt = 'teamwork'
conf = 'USE_MODULE_TEAMWORK'
src = files(
'e_mod_main.c',
'e_mod_config.c',
'e_mod_tw.c',
'wl.c',
'x11.c',
'e_mod_main.h'
)
if config_h.has('HAVE_WAYLAND') == true
src += [
'wl.c',
src += files(
'wl_teamwork.c',
'wl_teamwork.h'
]
endif
if config_h.has('HAVE_WAYLAND_ONLY') == false
src += [
'x11.c'
]
endif
icon = [
'e-module-' + module + '.edj',
'module.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(icon, install_dir: dir_mod)
shared_module(module, src,
include_directories: include_directories(module_includes),
name_prefix : '',
dependencies : module_deps,
install_dir : dir_mod_bin,
install : true
)
)
endif

View File

@ -1,5 +1,6 @@
#define E_COMP_WL
#include "e_mod_main.h"
#ifdef HAVE_WAYLAND
#include "wl_teamwork.h"
static struct wl_resource *tw_resource;
@ -134,3 +135,4 @@ wl_tw_shutdown(void)
tw_signal_link_progress[E_PIXMAP_TYPE_WL] = NULL;
tw_signal_link_downloading[E_PIXMAP_TYPE_WL] = NULL;
}
#endif

View File

@ -1,6 +1,7 @@
#define E_COMP_X
#include "e_mod_main.h"
#ifndef HAVE_WAYLAND_ONLY
enum
{
TEAMWORK_PRELOAD,
@ -139,3 +140,4 @@ x11_tw_shutdown(void)
tw_signal_link_progress[E_PIXMAP_TYPE_X] = NULL;
tw_signal_link_downloading[E_PIXMAP_TYPE_X] = NULL;
}
#endif