aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/vala/8 generated sources/dependency-generated/meson.build
diff options
context:
space:
mode:
authorAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
committerAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
commitaf1a266670d040d2f4083ff309d732d648afba2a (patch)
tree2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/vala/8 generated sources/dependency-generated/meson.build
parente02cda008591317b1625707ff8e115a4841aa889 (diff)
Add submodule dependency filesHEADmaster
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/vala/8 generated sources/dependency-generated/meson.build')
-rw-r--r--meson/test cases/vala/8 generated sources/dependency-generated/meson.build44
1 files changed, 44 insertions, 0 deletions
diff --git a/meson/test cases/vala/8 generated sources/dependency-generated/meson.build b/meson/test cases/vala/8 generated sources/dependency-generated/meson.build
new file mode 100644
index 000000000..a1895b4f7
--- /dev/null
+++ b/meson/test cases/vala/8 generated sources/dependency-generated/meson.build
@@ -0,0 +1,44 @@
+# Test that dependencies with their own generated sources don't
+# confuse the Vala build instruction generator.
+
+# Test case for https://github.com/mesonbuild/meson/issues/1084
+
+gnome = import('gnome')
+
+gobject = dependency('gobject-2.0')
+
+enums = gnome.mkenums('enum-types',
+ sources: 'enums.h',
+ c_template: 'enum-types.c.template',
+ h_template: 'enum-types.h.template',
+)
+
+libcommon = library('common',
+ enums[0], enums[1],
+ dependencies: gobject)
+
+common_dep = declare_dependency(
+ # This is required so that whoever depends on this also depends
+ # on the generated header; that won't happen implicitly.
+ # See: https://github.com/mesonbuild/meson/issues/1084
+ sources: enums[1],
+ link_with: libcommon,
+)
+
+libplover_vala = library('plover',
+ 'lib.vala',
+ dependencies: [common_dep, gobject]
+)
+
+plover_dep = declare_dependency(
+ link_with: libplover_vala,
+ dependencies: common_dep
+)
+
+vala_prog = executable('hello',
+ 'main.vala',
+ link_with: libplover_vala,
+ # There's no need to specify common_dep here since plover_dep pulls it
+ # in, but it should be harmless to do so.
+ dependencies: [common_dep, plover_dep, gobject]
+)