summaryrefslogtreecommitdiffstats
path: root/test cases/linuxlike/4 extdep static lib
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/linuxlike/4 extdep static lib')
-rw-r--r--test cases/linuxlike/4 extdep static lib/lib.c8
-rw-r--r--test cases/linuxlike/4 extdep static lib/meson.build10
-rw-r--r--test cases/linuxlike/4 extdep static lib/prog.c5
3 files changed, 23 insertions, 0 deletions
diff --git a/test cases/linuxlike/4 extdep static lib/lib.c b/test cases/linuxlike/4 extdep static lib/lib.c
new file mode 100644
index 0000000..bbda9aa
--- /dev/null
+++ b/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/test cases/linuxlike/4 extdep static lib/meson.build b/test cases/linuxlike/4 extdep static lib/meson.build
new file mode 100644
index 0000000..1a73e49
--- /dev/null
+++ b/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/test cases/linuxlike/4 extdep static lib/prog.c b/test cases/linuxlike/4 extdep static lib/prog.c
new file mode 100644
index 0000000..0aeb827
--- /dev/null
+++ b/test cases/linuxlike/4 extdep static lib/prog.c
@@ -0,0 +1,5 @@
+int statlibfunc(void);
+
+int main(void) {
+ return statlibfunc();
+}