summaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2018-11-17 19:45:52 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2018-11-21 21:36:39 +0200
commit443a4a8c78a41653abc78dabbb664739c2811d02 (patch)
tree5115aa7337b71ffb2d938836ee2ee82c9e8d93c3 /test cases
parent5e91eb3d0c6750bc70504c02ca942f69aeb46178 (diff)
downloadmeson-443a4a8c78a41653abc78dabbb664739c2811d02.tar.gz
pkgconfig: add support for pkgconfig generation for c#
this adds support for generating pkgconfig files for c#. The difference to c and cpp is that the -I flag is not known to the c# compiler, but rather the -r flag which is used to link a .dll file into the compiled library. However this opens the question of validating which pkgconfig files can be generated (depending on the language). This implements 4409.
Diffstat (limited to 'test cases')
-rw-r--r--test cases/unit/48 pkgconfig csharp library/meson.build10
-rw-r--r--test cases/unit/48 pkgconfig csharp library/somelib.cs12
2 files changed, 22 insertions, 0 deletions
diff --git a/test cases/unit/48 pkgconfig csharp library/meson.build b/test cases/unit/48 pkgconfig csharp library/meson.build
new file mode 100644
index 000000000..148d40fe4
--- /dev/null
+++ b/test cases/unit/48 pkgconfig csharp library/meson.build
@@ -0,0 +1,10 @@
+project('pkgformat', 'cs',
+ version : '1.0')
+
+pkgg = import('pkgconfig')
+
+l = library('libsomething', 'somelib.cs')
+
+pkgg.generate(l,
+ version: '1.0',
+ description: 'A library that does something')
diff --git a/test cases/unit/48 pkgconfig csharp library/somelib.cs b/test cases/unit/48 pkgconfig csharp library/somelib.cs
new file mode 100644
index 000000000..24d37edf6
--- /dev/null
+++ b/test cases/unit/48 pkgconfig csharp library/somelib.cs
@@ -0,0 +1,12 @@
+using System;
+
+namespace Abc
+{
+ public static class Something
+ {
+ public static bool Api1(this String str)
+ {
+ return str == "foo";
+ }
+ }
+}