aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/linuxlike/4 extdep static lib
diff options
context:
space:
mode:
Diffstat (limited to 'meson/test cases/linuxlike/4 extdep static lib')
-rw-r--r--meson/test cases/linuxlike/4 extdep static lib/lib.c8
-rw-r--r--meson/test cases/linuxlike/4 extdep static lib/meson.build10
-rw-r--r--meson/test cases/linuxlike/4 extdep static lib/prog.c5
3 files changed, 23 insertions, 0 deletions
diff --git a/meson/test cases/linuxlike/4 extdep static lib/lib.c b/meson/test cases/linuxlike/4 extdep static lib/lib.c
new file mode 100644
index 000000000..bbda9aae7
--- /dev/null
+++ b/meson/test cases/linuxlike/4 extdep static lib/lib.c
@@ -0,0 +1,8 @@
+#include<zlib.h>
+
+int statlibfunc(void) {
+ void * something = deflate;
+ if(something != 0)
+ return 0;
+ return 1;
+}
diff --git a/meson/test cases/linuxlike/4 extdep static lib/meson.build b/meson/test cases/linuxlike/4 extdep static lib/meson.build
new file mode 100644
index 000000000..1a73e494e
--- /dev/null
+++ b/meson/test cases/linuxlike/4 extdep static lib/meson.build
@@ -0,0 +1,10 @@
+project('external dependency with static', 'c')
+
+# Zlib is probably on all dev machines.
+
+dep = dependency('zlib')
+statlib = static_library('statlib', 'lib.c', dependencies : dep)
+exe = executable('prog', 'prog.c', link_with : statlib)
+
+
+test('zlibtest', exe)
diff --git a/meson/test cases/linuxlike/4 extdep static lib/prog.c b/meson/test cases/linuxlike/4 extdep static lib/prog.c
new file mode 100644
index 000000000..0aeb8271b
--- /dev/null
+++ b/meson/test cases/linuxlike/4 extdep static lib/prog.c
@@ -0,0 +1,5 @@
+int statlibfunc(void);
+
+int main(void) {
+ return statlibfunc();
+}