From fb0c97485d90a37ecd870810d2152c7442a9e84c Mon Sep 17 00:00:00 2001 From: Niels De Graef Date: Thu, 30 Apr 2020 19:52:28 +0000 Subject: data: switch gdm.service.in to use cmake format We're going to be switching to meson, and meson doesn't deal too well with an @ in the configuration file that's not part of a substitution variable. This commit switches the gdm service over to use a cmake style of substitution variables, so we can later tell meson to use configure in cmake mode and workaround the @ confusion. --- libgdm/libgdm.map | 6 ++++ libgdm/meson.build | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100644 libgdm/libgdm.map create mode 100644 libgdm/meson.build (limited to 'libgdm') diff --git a/libgdm/libgdm.map b/libgdm/libgdm.map new file mode 100644 index 00000000..6a1c7fa1 --- /dev/null +++ b/libgdm/libgdm.map @@ -0,0 +1,6 @@ +{ +global: + *; +local: + _*; +}; diff --git a/libgdm/meson.build b/libgdm/meson.build new file mode 100644 index 00000000..3f8cafbb --- /dev/null +++ b/libgdm/meson.build @@ -0,0 +1,104 @@ +libgdm_manager_dbus_gen = gnome.gdbus_codegen('gdm-manager-glue', + sources: '..' / 'daemon' / 'gdm-manager.xml', + namespace: 'Gdm', + interface_prefix: 'org.gnome.DisplayManager', + autocleanup: 'all', + annotations: [ + [ 'org.gnome.DisplayManager.Manager', 'org.gtk.GDBus.C.Name', 'Manager' ], + ], + build_by_default: true, +) +libgdm_client_dbus_gen = gnome.gdbus_codegen('gdm-client-glue', + sources: '..' / 'daemon' / 'gdm-session.xml', + namespace: 'Gdm', + interface_prefix: 'org.gnome.DisplayManager', + autocleanup: 'all', + annotations: [ + [ 'org.gnome.DisplayManager.UserVerifier', 'org.gtk.GDBus.C.Name', 'UserVerifier' ], + [ 'org.gnome.DisplayManager.Greeter', 'org.gtk.GDBus.C.Name', 'Greeter' ], + [ 'org.gnome.DisplayManager.RemoteGreeter', 'org.gtk.GDBus.C.Name', 'RemoteGreeter' ], + [ 'org.gnome.DisplayManager.Chooser', 'org.gtk.GDBus.C.Name', 'Chooser' ], + ], + build_by_default: true, + install_header: true, + install_dir: get_option('includedir') / meson.project_name() +) + +libgdm_built_sources = [ + libgdm_manager_dbus_gen, + libgdm_client_dbus_gen, +] + +libgdm_sources = files( + 'gdm-client.c', + 'gdm-sessions.c', + 'gdm-user-switching.c', +) + +libgdm_public_headers = [ + 'gdm-client.h', + 'gdm-sessions.h', + 'gdm-user-switching.h', + # gdm-client-glue.h is automatically installed +] + +install_headers(libgdm_public_headers, + subdir: meson.project_name(), +) + +libgdm_headers = [ + libgdm_public_headers, + libgdm_client_dbus_gen[1], + libgdm_manager_dbus_gen[1], +] + +libgdm_deps = [ + glib_dep, + gio_dep, + gio_unix_dep, + libsystemd_dep, + libgdmcommon_dep, +] + +libgdm_link_flags = [ + '-Wl,--version-script,@0@/libgdm.map'.format(meson.current_source_dir()), +] + +libgdm = library('gdm', + libgdm_sources + libgdm_built_sources, + version: '1.0.0', + dependencies: libgdm_deps, + include_directories: config_h_dir, + link_args: libgdm_link_flags, + install: true, +) + +libgdm_gir_includes = [ + 'GLib-2.0', + 'GObject-2.0', + 'Gio-2.0', +] + +libgdm_dep = declare_dependency( + link_with: libgdm, + dependencies: libgdm_deps, + include_directories: include_directories('.'), + sources: libgdm_built_sources, +) + +libgdm_gir = gnome.generate_gir(libgdm, + sources: libgdm_headers + libgdm_sources, + namespace: 'Gdm', + nsversion: '1.0', + identifier_prefix: 'Gdm', + includes: libgdm_gir_includes, + install: true, +) + +# Pkg-config file +pkgconfig.generate(libgdm, + name: 'GDM Client Library', + description: 'Client Library for communicating with GDM daemon', + filebase: meson.project_name(), + requires: gobject_dep, +) -- cgit v1.2.1