aboutsummaryrefslogtreecommitdiff
path: root/test cases/csharp
diff options
context:
space:
mode:
authorThibault Saunier <thibault.saunier@osg.samsung.com>2017-08-24 16:09:07 -0300
committerThibault Saunier <thibault.saunier@osg.samsung.com>2017-08-24 16:09:07 -0300
commit52b7f1a0960081521da0178e82ee83a5e4f5e803 (patch)
treeb2de982a8015f013617f7b1779bd9e9b277ae6c5 /test cases/csharp
parent596c7106f79f3a191c206af388ee1bad3b088ca8 (diff)
downloadmeson-52b7f1a0960081521da0178e82ee83a5e4f5e803.zip
meson-52b7f1a0960081521da0178e82ee83a5e4f5e803.tar.gz
meson-52b7f1a0960081521da0178e82ee83a5e4f5e803.tar.bz2
c#: Handle external dependencies from .pc files
Diffstat (limited to 'test cases/csharp')
-rw-r--r--test cases/csharp/4 external dep/hello.txt1
-rw-r--r--test cases/csharp/4 external dep/meson.build4
-rw-r--r--test cases/csharp/4 external dep/prog.cs8
3 files changed, 13 insertions, 0 deletions
diff --git a/test cases/csharp/4 external dep/hello.txt b/test cases/csharp/4 external dep/hello.txt
new file mode 100644
index 0000000..980a0d5
--- /dev/null
+++ b/test cases/csharp/4 external dep/hello.txt
@@ -0,0 +1 @@
+Hello World!
diff --git a/test cases/csharp/4 external dep/meson.build b/test cases/csharp/4 external dep/meson.build
new file mode 100644
index 0000000..004d25f
--- /dev/null
+++ b/test cases/csharp/4 external dep/meson.build
@@ -0,0 +1,4 @@
+project('C# external library', 'cs')
+glib_sharp_2 = dependency('glib-sharp-2.0')
+e = executable('prog', 'prog.cs', dependencies: glib_sharp_2, install : true)
+test('libtest', e, args: [join_paths(meson.current_source_dir(), 'hello.txt')])
diff --git a/test cases/csharp/4 external dep/prog.cs b/test cases/csharp/4 external dep/prog.cs
new file mode 100644
index 0000000..9393fef
--- /dev/null
+++ b/test cases/csharp/4 external dep/prog.cs
@@ -0,0 +1,8 @@
+using System;
+using GLib;
+
+public class Prog {
+ static public void Main (string[] args) {
+ Console.WriteLine(GLib.FileUtils.GetFileContents(args[0]));
+ }
+}