diff options
| author | Jussi Pakkanen <jpakkane@gmail.com> | 2014-09-03 22:13:14 +0300 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2014-09-03 22:13:14 +0300 |
| commit | 3ed22fcc56877ca974e31b7fd80343b126f866aa (patch) | |
| tree | 3e8663e88105715a32b94bd4abf45c4cd62ceab1 /test cases | |
| parent | 1c0a735e00e12140817432f5b1218f388f59b287 (diff) | |
| download | meson-3ed22fcc56877ca974e31b7fd80343b126f866aa.tar.gz | |
Use external libs of static libraries when the static library is linked to a final target.
Diffstat (limited to 'test cases')
| -rw-r--r-- | test cases/linuxlike/4 extdep static lib/lib.c | 8 | ||||
| -rw-r--r-- | test cases/linuxlike/4 extdep static lib/meson.build | 10 | ||||
| -rw-r--r-- | test cases/linuxlike/4 extdep static lib/prog.c | 5 |
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 000000000..2f3b3c9a5 --- /dev/null +++ b/test cases/linuxlike/4 extdep static lib/lib.c @@ -0,0 +1,8 @@ +#include<zlib.h> + +int statlibfunc() { + 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 000000000..1a73e494e --- /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 000000000..843c6284f --- /dev/null +++ b/test cases/linuxlike/4 extdep static lib/prog.c @@ -0,0 +1,5 @@ +int statlibfunc(); + +int main(int argc, char **argv) { + return statlibfunc(); +} |
