diff options
author | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
---|---|---|
committer | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/vala/16 mixed dependence | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/vala/16 mixed dependence')
4 files changed, 31 insertions, 0 deletions
diff --git a/meson/test cases/vala/16 mixed dependence/app.vala b/meson/test cases/vala/16 mixed dependence/app.vala new file mode 100644 index 000000000..5b545436b --- /dev/null +++ b/meson/test cases/vala/16 mixed dependence/app.vala @@ -0,0 +1,7 @@ +namespace App { + public static int main(string[] args) { + var mixer = new Mixer(); + print("Current volume is %u\n", mixer.get_volume()); + return 0; + } +} diff --git a/meson/test cases/vala/16 mixed dependence/meson.build b/meson/test cases/vala/16 mixed dependence/meson.build new file mode 100644 index 000000000..b44b47b31 --- /dev/null +++ b/meson/test cases/vala/16 mixed dependence/meson.build @@ -0,0 +1,16 @@ +project('mixed dependence', 'vala', 'c') + +cc = meson.get_compiler('c') + +deps = [dependency('glib-2.0'), dependency('gobject-2.0'), + # Should be ignored, see https://github.com/mesonbuild/meson/issues/1939 + cc.find_library('z')] + +mixer = static_library('mixer', 'mixer.vala', 'mixer-glue.c', + dependencies : deps) + +app = executable('app', 'app.vala', + link_with : mixer, + dependencies : deps) + +test('valamixeddependencetest', app) diff --git a/meson/test cases/vala/16 mixed dependence/mixer-glue.c b/meson/test cases/vala/16 mixed dependence/mixer-glue.c new file mode 100644 index 000000000..d6c0c37e0 --- /dev/null +++ b/meson/test cases/vala/16 mixed dependence/mixer-glue.c @@ -0,0 +1,5 @@ +#include "mixer.h" + +guint mixer_get_volume(Mixer *mixer) { + return 11; +} diff --git a/meson/test cases/vala/16 mixed dependence/mixer.vala b/meson/test cases/vala/16 mixed dependence/mixer.vala new file mode 100644 index 000000000..f207132be --- /dev/null +++ b/meson/test cases/vala/16 mixed dependence/mixer.vala @@ -0,0 +1,3 @@ +public class Mixer : Object { + public extern uint get_volume(); +} |