[libwnck/wip/marco/meson-build: 4/4] meson: use gnome.mkenums_simple for generated types
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libwnck/wip/marco/meson-build: 4/4] meson: use gnome.mkenums_simple for generated types
- Date: Fri, 21 Sep 2018 09:38:29 +0000 (UTC)
commit 88cc3c801f18b123c2feb5daf45b2e7c92f1b0ea
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Thu Sep 20 17:03:08 2018 +0200
meson: use gnome.mkenums_simple for generated types
libwnck/meson.build | 36 ++----------------------------------
1 file changed, 2 insertions(+), 34 deletions(-)
---
diff --git a/libwnck/meson.build b/libwnck/meson.build
index b01ea2c..5b26fca 100644
--- a/libwnck/meson.build
+++ b/libwnck/meson.build
@@ -55,44 +55,12 @@ a11y_sources = [
'workspace-accessible-factory.h',
]
-enum_types = []
-enum_types += gnome.mkenums(
- 'wnck-enum-types.h',
- sources: headers,
- fhead: '''#if !defined (__LIBWNCK_H_INSIDE__) && !defined (WNCK_COMPILATION)
-#error "Only <libwnck/libwnck.h> can be included directly."
-#endif
-#ifndef __WNCK_ENUM_TYPES_H__
-#define __WNCK_ENUM_TYPES_H__
-G_BEGIN_DECLS''',
- ftail: '''G_END_DECLS
-#endif /* __WNCK_ENUM_TYPES_H__ */''',
- eprod: '''#define WNCK_TYPE_@ENUMSHORT@ @enum_name@_get_type()
-GType @enum_name@_get_type (void);''',
+enum_types = gnome.mkenums_simple('wnck-enum-types',
+ sources : headers,
install_header: true,
install_dir: libwnck_includedir
)
-enum_types += gnome.mkenums(
- 'wnck-enum-types.c',
- sources: headers,
- fhead: '#include <libwnck/libwnck.h>',
- fprod: '/* enumerations from "@filename@" */',
- vhead: 'static const G@Type@Value _@enum_name@_values[] = {',
- vprod: '{ @VALUENAME@, "@VALUENAME@", "@valuenick@" },',
- vtail: '''{ 0, NULL, NULL }
-};
-
-GType
-@enum_name@_get_type (void)
-{
- static GType type = 0;
- if (!type)
- type = g_@type@_register_static ("@EnumName@", _@enum_name@_values);
- return type;
-}'''
-)
-
resources = gnome.compile_resources(
'@0@-resources'.format(meson.project_name()),
'wnck.gresource.xml',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]