[gnome-builder/wip/gtk4-port] plugins/meson-templates: add back shared library template



commit 5c31a1843392320c7a715d420721844a08220676
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jun 8 12:49:22 2022 -0700

    plugins/meson-templates: add back shared library template

 .../meson-templates/gbp-meson-template-provider.c        | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
---
diff --git a/src/plugins/meson-templates/gbp-meson-template-provider.c 
b/src/plugins/meson-templates/gbp-meson-template-provider.c
index 59b8dced1..0a5afd855 100644
--- a/src/plugins/meson-templates/gbp-meson-template-provider.c
+++ b/src/plugins/meson-templates/gbp-meson-template-provider.c
@@ -114,6 +114,14 @@ static const GbpMesonTemplateLanguageScope gtk4_language_scope[] = {
   { "JavaScript", IDE_STRV_INIT ("exec_name={{appid}}") },
 };
 
+static GbpMesonTemplateExpansion library_expansions[] = {
+  { "meson.build", "meson.build" },
+  { "src/meson-clib.build", "src/meson.build" },
+  { "src/hello.c", "src/{{name}}.c" },
+  { "src/hello.h", "src/{{name}}.h" },
+  { "src/hello-version.h.in", "src/{{name}}-version.h.in" },
+};
+
 static const GbpMesonTemplateInfo templates[] = {
   {
     -1000,
@@ -145,6 +153,14 @@ static const GbpMesonTemplateInfo templates[] = {
                    "ui_file=window.ui",
                    "exec_name={{name}}"),
   },
+  {
+    -800,
+    "library",
+    N_("Shared Library"),
+    N_("A Meson-based project for a shared library"),
+    IDE_STRV_INIT ("C"),
+    library_expansions, G_N_ELEMENTS (library_expansions),
+  },
 };
 
 static GList *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]