~aperezdc/gtklock-dpms-module

202f983d24f6a0815f9be4740efbddf8fee3f31d — Adrian Perez de Castro 8 months ago 4194e26
Pick version from Meson
2 files changed, 9 insertions(+), 5 deletions(-)

M meson.build
M module.c
M meson.build => meson.build +6 -2
@@ 5,8 5,9 @@ project('gtklock-dpms', 'c',
    'c_std=c11',
  ],
  license: 'GPL-3.0-only',
  version: '1',
  version: '2.1.1',
)
version = meson.project_version().split('.')

gtk3_dep = dependency('gtk+-3.0')
gdk3_wl_dep = dependency('gdk-wayland-3.0')


@@ 45,7 46,10 @@ gtklock_dpms_module = shared_module('gtklock-dpms',
  wlr_output_power_management_c,
  c_args: [
    '-DG_LOG_DOMAIN="GtkLock-DPMS"',
    '-DVERSION="@0@"'.format(meson.project_version()),
    '-DVERSION_STRING="@0@"'.format(meson.project_version()),
    '-DVERSION_MAJOR=@0@'.format(version[0]),
    '-DVERSION_MINOR=@0@'.format(version[1]),
    '-DVERSION_PATCH=@0@'.format(version[2]),
  ],
  dependencies: [
    gtk3_dep,

M module.c => module.c +3 -3
@@ 31,9 31,9 @@ struct GtkLock {
    gboolean use_idle_hide;
};

G_MODULE_EXPORT unsigned module_major_version = 2;
G_MODULE_EXPORT unsigned module_minor_version = 1;
G_MODULE_EXPORT char* module_version = VERSION;
G_MODULE_EXPORT unsigned module_major_version = VERSION_MAJOR;
G_MODULE_EXPORT unsigned module_minor_version = VERSION_MINOR;
G_MODULE_EXPORT char* module_version = VERSION_STRING;

typedef struct {
    uint32_t name;