diff options
author | David Herrmann <dh.herrmann@googlemail.com> | 2013-01-24 20:32:40 +0100 |
---|---|---|
committer | David Herrmann <dh.herrmann@googlemail.com> | 2013-01-24 20:32:40 +0100 |
commit | 4f8edb38c8171ce66d116c1f426fae195b837b97 (patch) | |
tree | 60a7b5e57313b02f4f486136c6dc7a6caac7ce5c /src | |
parent | 6a7cbd8fc06e41eb8fa5212394123de7d65159dd (diff) |
wlt: link font library statically
We need the font layer to build wlterm. However, the font layer depends on
kmscon internal module handling so we cannot do this. To avoid this, we
simply provide dummy handlers for the kmscon_module_* layer and link it
anyway. This is kind of ugly but works, yey!
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/wlt_main.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/wlt_main.c b/src/wlt_main.c index 6863e7a..061544c 100644 --- a/src/wlt_main.c +++ b/src/wlt_main.c @@ -37,10 +37,10 @@ #include <wayland-client.h> #include "conf.h" #include "eloop.h" +#include "font.h" #include "log.h" #include "shl_dlist.h" #include "shl_misc.h" -#include "text.h" #include "wlt_main.h" #include "wlt_terminal.h" #include "wlt_theme.h" @@ -54,6 +54,18 @@ struct wlt_app { struct wlt_window *wnd; }; +/* TODO: The font layer depends on kmscon modules. However, the WLT applications + * doesn't use them. Therefore, we provide dummy kmscon_module_* helpers here + * which satisfy the dependencies and allow us to link to font.so. */ + +void kmscon_module_ref(struct kmscon_module *m) +{ +} + +void kmscon_module_unref(struct kmscon_module *m) +{ +} + static void sig_generic(struct ev_eloop *eloop, struct signalfd_siginfo *info, void *data) { @@ -434,6 +446,7 @@ int main(int argc, char **argv) log_print_init("wlterm"); kmscon_font_register(&kmscon_font_8x16_ops); + kmscon_font_register(&kmscon_font_pango_ops); memset(&app, 0, sizeof(app)); ret = setup_app(&app); @@ -443,6 +456,7 @@ int main(int argc, char **argv) ev_eloop_run(app.eloop, -1); destroy_app(&app); + kmscon_font_unregister(kmscon_font_pango_ops.name); kmscon_font_unregister(kmscon_font_8x16_ops.name); conf_ctx_free(conf); log_info("exiting"); @@ -450,6 +464,7 @@ int main(int argc, char **argv) return EXIT_SUCCESS; err_unload: + kmscon_font_unregister(kmscon_font_pango_ops.name); kmscon_font_unregister(kmscon_font_8x16_ops.name); err_conf: conf_ctx_free(conf); |