diff options
author | Patrick Griffis <tingping@tingping.se> | 2016-12-13 16:12:03 -0500 |
---|---|---|
committer | Patrick Griffis <tingping@tingping.se> | 2017-06-13 23:54:51 -0400 |
commit | 628100c19f5d82747170acdf2917cba8c119ccbf (patch) | |
tree | 351a7e9714a1a58390ba349808df5703cef25c3e /src/common/dbus | |
parent | 2edf50d4ddc61ce6f73bf02263c9bdd09632c66b (diff) |
build: Replace Autotools with Meson
Quick rundown of benefits: - Much faster: - Autotools (with autogen): 22 seconds - Meson: 7 seconds - Meson (with ccache): 2 seconds - Simpler: - ~1000 lines smaller - Single simple language - Potentially better Windows (Visual Studio) support What is not done: - Complete Windows support - OSX support (easy) Closes #2013 Closes #1937 Closes #1803
Diffstat (limited to 'src/common/dbus')
-rw-r--r-- | src/common/dbus/Makefile.am | 35 | ||||
-rw-r--r-- | src/common/dbus/meson.build | 44 |
2 files changed, 44 insertions, 35 deletions
diff --git a/src/common/dbus/Makefile.am b/src/common/dbus/Makefile.am deleted file mode 100644 index 869c283e..00000000 --- a/src/common/dbus/Makefile.am +++ /dev/null @@ -1,35 +0,0 @@ -noinst_LIBRARIES = libhexchatdbus.a -libhexchatdbus_a_SOURCES = \ - dbus-plugin.c \ - dbus-plugin.h \ - dbus-client.c \ - dbus-client.h - -EXTRA_DIST = \ - remote-object.xml \ - example.py \ - org.hexchat.service.service.in - -BUILT_SOURCES = \ - remote-object-glue.h - -# Dbus service file -servicedir = $(DBUS_SERVICES_DIR) -service_in_files = org.hexchat.service.service.in -service_DATA = $(service_in_files:.service.in=.service) - -CLEANFILES = $(BUILT_SOURCES) $(service_DATA) - -AM_CPPFLAGS = -I$(top_srcdir)/src/common $(COMMON_CFLAGS) $(DBUS_CFLAGS) - -noinst_PROGRAMS = example -example_SOURCES = example.c -example_LDADD = $(DBUS_LIBS) $(GLIB_LIBS) - -remote-object-glue.h: remote-object.xml - $(AM_V_GEN) $(LIBTOOL) --mode=execute $(DBUS_BINDING_TOOL) --prefix=remote_object --mode=glib-server --output=$@ $< - -# Rule to make the service file with bindir expanded -$(service_DATA): $(service_in_files) Makefile - @sed -e "s|\@bindir\@|$(bindir)|" $< > $@ - diff --git a/src/common/dbus/meson.build b/src/common/dbus/meson.build new file mode 100644 index 00000000..56443377 --- /dev/null +++ b/src/common/dbus/meson.build @@ -0,0 +1,44 @@ +dbus_deps = [ + dependency('dbus-glib-1') +] + +dbus_sources = [ + 'dbus-plugin.c', + 'dbus-client.c' +] + +dbus_includes = [ + include_directories('..'), + config_h_include +] + +dbus_service_dir = join_paths(get_option('datadir'), 'dbus-1/services') + +dbus_conf = configuration_data() +dbus_conf.set('bindir', join_paths(get_option('prefix'), get_option('bindir'))) +configure_file( + input: 'org.hexchat.service.service.in', + output: 'org.hexchat.service.service', + configuration: dbus_conf, + install: true, + install_dir: dbus_service_dir +) + +dbus_binding_tool = find_program('dbus-binding-tool') +dbus_remote_object = custom_target('remote-object-glue', + input: 'remote-object.xml', + output: 'remote-object-glue.h', + command: [dbus_binding_tool, '--prefix=remote_object', '--mode=glib-server', + '--output=@OUTPUT@', '@INPUT@'] +) + +hexchat_dbus = static_library('hexchatdbus', + sources: [dbus_remote_object, marshal] + dbus_sources, + dependencies: common_deps + dbus_deps, + include_directories: dbus_includes, + pic: true +) + +hexchat_dbus_dep = declare_dependency( + link_with: hexchat_dbus +) |