diff options
author | 2023-10-10 14:33:42 +0000 | |
---|---|---|
committer | 2023-10-10 14:33:42 +0000 | |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/linuxlike/4 extdep static lib | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/linuxlike/4 extdep static lib')
-rw-r--r-- | meson/test cases/linuxlike/4 extdep static lib/lib.c | 8 | ||||
-rw-r--r-- | meson/test cases/linuxlike/4 extdep static lib/meson.build | 10 | ||||
-rw-r--r-- | meson/test cases/linuxlike/4 extdep static lib/prog.c | 5 |
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(); +} |