aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2021-04-06 14:29:23 -0400
committerJussi Pakkanen <jpakkane@gmail.com>2021-04-19 17:57:34 +0300
commit3c64ecaf866ca611b40287c78f622e370f90f272 (patch)
treef9d39368fe36c75295ed2d60d045392a98da166e /test cases
parent8f6ad8e52e7ad7663b7737f32cb6c624971830fe (diff)
downloadmeson-3c64ecaf866ca611b40287c78f622e370f90f272.zip
meson-3c64ecaf866ca611b40287c78f622e370f90f272.tar.gz
meson-3c64ecaf866ca611b40287c78f622e370f90f272.tar.bz2
pkgconfig: Add support for CustomTarget objects in generator
Fixes: #8618.
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/45 pkgconfig-gen/meson.build19
-rw-r--r--test cases/common/45 pkgconfig-gen/test.json4
2 files changed, 22 insertions, 1 deletions
diff --git a/test cases/common/45 pkgconfig-gen/meson.build b/test cases/common/45 pkgconfig-gen/meson.build
index 6a3b788..7885391 100644
--- a/test cases/common/45 pkgconfig-gen/meson.build
+++ b/test cases/common/45 pkgconfig-gen/meson.build
@@ -101,3 +101,22 @@ stat2 = static_library('stat2', 'simple.c', install: true)
simple4 = library('simple4', 'simple.c', link_with: stat2)
simple5 = library('simple5', 'simple5.c', link_with: simple4, link_whole: stat2)
pkgg.generate(simple5)
+
+# Test passing a linkable CustomTarget and CustomTargetIndex to generator.
+# Do this only with gcc/clang to not have to deal with other compiler command
+# line specificities.
+if cc.get_id() in ['gcc', 'clang']
+ ct = custom_target('ct',
+ input: 'simple.c',
+ output: 'libct.so',
+ command: [cc.cmd_array(), '@INPUT@', '-shared', '-o', '@OUTPUT@'],
+ )
+ pkgg.generate(libraries: ct,
+ name: 'ct',
+ description: 'custom target'
+ )
+ pkgg.generate(libraries: ct[0],
+ name: 'ct0',
+ description: 'custom target index'
+ )
+endif
diff --git a/test cases/common/45 pkgconfig-gen/test.json b/test cases/common/45 pkgconfig-gen/test.json
index 702e7fe..e741a62 100644
--- a/test cases/common/45 pkgconfig-gen/test.json
+++ b/test cases/common/45 pkgconfig-gen/test.json
@@ -8,6 +8,8 @@
{"type": "file", "file": "usr/lib/pkgconfig/libhello_nolib.pc"},
{"type": "file", "file": "usr/lib/pkgconfig/simple2.pc"},
{"type": "file", "file": "usr/lib/pkgconfig/simple3.pc"},
- {"type": "file", "file": "usr/lib/pkgconfig/simple5.pc"}
+ {"type": "file", "file": "usr/lib/pkgconfig/simple5.pc"},
+ {"type": "file", "file": "usr/lib/pkgconfig/ct.pc"},
+ {"type": "file", "file": "usr/lib/pkgconfig/ct0.pc"}
]
}