From 94abc672375a68425d210bec872167922808391c Mon Sep 17 00:00:00 2001 From: Manatsawin Hanmongkolchai Date: Mon, 14 Nov 2022 23:52:41 +0700 Subject: Add plugin build --- meson.build | 3 ++- plugins/fullscreen/meson.build | 27 +++++++++++++++++++++++++++ plugins/meson.build | 8 ++++++++ plugins/reload/meson.build | 27 +++++++++++++++++++++++++++ plugins/statusbar-date/meson.build | 27 +++++++++++++++++++++++++++ src/meson.build | 2 +- 6 files changed, 92 insertions(+), 2 deletions(-) create mode 100644 plugins/fullscreen/meson.build create mode 100644 plugins/meson.build create mode 100644 plugins/reload/meson.build create mode 100644 plugins/statusbar-date/meson.build diff --git a/meson.build b/meson.build index 237ea0e..54b6db0 100644 --- a/meson.build +++ b/meson.build @@ -20,6 +20,7 @@ libdir = join_paths(get_option('prefix'), get_option('libdir')) schemadir = datadir / 'glib-2.0' / 'schemas' localedir = join_paths(get_option('prefix'), get_option('localedir')) includedir = join_paths(get_option('prefix'), get_option('includedir')) +pluginsdir = libdir / 'eom' / 'plugins' # Dependencies glib_required = '2.52.0' @@ -200,7 +201,7 @@ endif subdir('cut-n-paste') subdir('src') subdir('man') -#subdir('plugins') +subdir('plugins') subdir('help') subdir('data') subdir('doc') diff --git a/plugins/fullscreen/meson.build b/plugins/fullscreen/meson.build new file mode 100644 index 0000000..9688a12 --- /dev/null +++ b/plugins/fullscreen/meson.build @@ -0,0 +1,27 @@ +desktopfile = configure_file(input: 'fullscreen.plugin.desktop.in.in', configuration: pkg_info, output: 'fullscreen.plugin.desktop.in') +if get_option('nls') + i18n.merge_file( + input: desktopfile, + output: 'fullscreen.plugin.desktop', + install: true, + install_dir: pluginsdir, + type: 'desktop', + po_dir: po_dir, + ) +else + install_data(desktopfile, install_dir: pluginsdir) +endif + +shared_library( + 'fullscreen', + sources: [ + 'eom-fullscreen-plugin.h', + 'eom-fullscreen-plugin.c', + ], + c_args: plugins_c_args, + dependencies: all_deps, + include_directories: [top_inc, src_inc], + link_with: [eom_links], + install: true, + install_dir: pluginsdir +) diff --git a/plugins/meson.build b/plugins/meson.build new file mode 100644 index 0000000..3513e60 --- /dev/null +++ b/plugins/meson.build @@ -0,0 +1,8 @@ +plugins_c_args = ['-DEOM_LOCALEDIR=' + join_paths(datadir / 'locale')] + +subdir('fullscreen') +subdir('reload') + +if exif.found() + subdir('statusbar-date') +endif diff --git a/plugins/reload/meson.build b/plugins/reload/meson.build new file mode 100644 index 0000000..de76d56 --- /dev/null +++ b/plugins/reload/meson.build @@ -0,0 +1,27 @@ +desktopfile = configure_file(input: 'reload.plugin.desktop.in.in', configuration: pkg_info, output: 'reload.plugin.desktop.in') +if get_option('nls') + i18n.merge_file( + input: desktopfile, + output: 'reload.plugin.desktop', + install: true, + install_dir: pluginsdir, + type: 'desktop', + po_dir: po_dir, + ) +else + install_data(desktopfile, install_dir: pluginsdir) +endif + +shared_library( + 'reload', + sources: [ + 'eom-reload-plugin.h', + 'eom-reload-plugin.c', + ], + c_args: plugins_c_args, + dependencies: all_deps, + include_directories: [top_inc, src_inc], + link_with: [eom_links], + install: true, + install_dir: pluginsdir +) diff --git a/plugins/statusbar-date/meson.build b/plugins/statusbar-date/meson.build new file mode 100644 index 0000000..7ddf83c --- /dev/null +++ b/plugins/statusbar-date/meson.build @@ -0,0 +1,27 @@ +desktopfile = configure_file(input: 'statusbar-date.plugin.desktop.in.in', configuration: pkg_info, output: 'statusbar-date.plugin.desktop.in') +if get_option('nls') + i18n.merge_file( + input: desktopfile, + output: 'statusbar-date.plugin.desktop', + install: true, + install_dir: pluginsdir, + type: 'desktop', + po_dir: po_dir, + ) +else + install_data(desktopfile, install_dir: pluginsdir) +endif + +shared_library( + 'statusbar-date', + sources: [ + 'eom-statusbar-date-plugin.h', + 'eom-statusbar-date-plugin.c', + ], + c_args: plugins_c_args, + dependencies: all_deps, + include_directories: [top_inc, src_inc], + link_with: [eom_links], + install: true, + install_dir: pluginsdir +) diff --git a/src/meson.build b/src/meson.build index fe8522b..d89162a 100644 --- a/src/meson.build +++ b/src/meson.build @@ -130,7 +130,7 @@ cflags = [ '-DG_LOG_DOMAIN="EOM"', '-DEOM_DATA_DIR="' + pkgdatadir + '"', '-DEOM_LOCALE_DIR="' + localedir + '"', - '-DEOM_PLUGIN_DIR="' + (libdir / 'eom' / 'plugins') + '"', + '-DEOM_PLUGIN_DIR="' + pluginsdir + '"', '-DLIBDIR="' + libdir + '"', ] -- cgit v1.2.1