parent
3fa3922cea
commit
3110c209f7
10 changed files with 26 additions and 100 deletions
@ -1,11 +0,0 @@ |
||||
usr/bin/?libsome-0.dll |
||||
usr/lib/libsome.dll.a |
||||
usr/bin/?libnoversion.dll |
||||
usr/lib/libnoversion.dll.a |
||||
usr/bin/?libonlyversion-1.dll |
||||
usr/lib/libonlyversion.dll.a |
||||
usr/bin/?libonlysoversion-5.dll |
||||
usr/lib/libonlysoversion.dll.a |
||||
usr/libexec/?libcustomdir.dll |
||||
usr/libexec/libcustomdir.dll.a |
||||
usr/lib/?libmodule.dll |
@ -1,55 +0,0 @@ |
||||
project('mingw dll versioning', 'c') |
||||
|
||||
cc = meson.get_compiler('c') |
||||
|
||||
if cc.get_id() == 'msvc' |
||||
error('MESON_SKIP_TEST: test is only for MinGW') |
||||
endif |
||||
|
||||
# Test that MinGW/GCC creates correctly-named dll files and dll.a files, |
||||
# and also installs them in the right place |
||||
some = shared_library('some', 'lib.c', |
||||
version : '1.2.3', |
||||
soversion : '0', |
||||
install : true) |
||||
|
||||
noversion = shared_library('noversion', 'lib.c', |
||||
install : true) |
||||
|
||||
onlyversion = shared_library('onlyversion', 'lib.c', |
||||
version : '1.4.5', |
||||
install : true) |
||||
|
||||
onlysoversion = shared_library('onlysoversion', 'lib.c', |
||||
# Also test that int soversion is acceptable |
||||
soversion : 5, |
||||
install : true) |
||||
|
||||
# Hack to make the executables below depend on the shared libraries above |
||||
# without actually adding them as `link_with` dependencies since we want to try |
||||
# linking to them with -lfoo linker arguments. |
||||
out = custom_target('library-dependency-hack', |
||||
input : 'exe.orig.c', |
||||
output : 'exe.c', |
||||
depends : [some, noversion, onlyversion, onlysoversion], |
||||
command : ['cp', '@INPUT@', '@OUTPUT@']) |
||||
|
||||
# Manually test if the linker can find the above libraries |
||||
# i.e., whether they were generated with the right naming scheme |
||||
test('manually linked 1', executable('manuallink1', out, |
||||
link_args : ['-L.', '-lsome'])) |
||||
|
||||
test('manually linked 2', executable('manuallink2', out, |
||||
link_args : ['-L.', '-lnoversion'])) |
||||
|
||||
test('manually linked 3', executable('manuallink3', out, |
||||
link_args : ['-L.', '-lonlyversion'])) |
||||
|
||||
test('manually linked 4', executable('manuallink4', out, |
||||
link_args : ['-L.', '-lonlysoversion'])) |
||||
|
||||
shared_library('customdir', 'lib.c', |
||||
install : true, |
||||
install_dir : get_option('libexecdir')) |
||||
|
||||
shared_module('module', 'lib.c', install : true) |
@ -0,0 +1,24 @@ |
||||
?msvc:usr/bin/some-0.dll |
||||
?msvc:usr/bin/some-0.pdb |
||||
?msvc:usr/lib/some.lib |
||||
?msvc:usr/bin/noversion.dll |
||||
?msvc:usr/bin/noversion.pdb |
||||
?msvc:usr/lib/noversion.lib |
||||
?msvc:usr/bin/onlyversion-1.dll |
||||
?msvc:usr/lib/onlyversion.lib |
||||
?msvc:usr/bin/onlysoversion-5.dll |
||||
?msvc:usr/lib/onlysoversion.lib |
||||
?msvc:usr/libexec/customdir.dll |
||||
?msvc:usr/libexec/customdir.lib |
||||
?msvc:usr/lib/module.dll |
||||
?gcc:usr/bin/?libsome-0.dll |
||||
?gcc:usr/lib/libsome.dll.a |
||||
?gcc:usr/bin/?libnoversion.dll |
||||
?gcc:usr/lib/libnoversion.dll.a |
||||
?gcc:usr/bin/?libonlyversion-1.dll |
||||
?gcc:usr/lib/libonlyversion.dll.a |
||||
?gcc:usr/bin/?libonlysoversion-5.dll |
||||
?gcc:usr/lib/libonlysoversion.dll.a |
||||
?gcc:usr/libexec/?libcustomdir.dll |
||||
?gcc:usr/libexec/libcustomdir.dll.a |
||||
?gcc:usr/lib/?libmodule.dll |
@ -1,9 +0,0 @@ |
||||
int myFunc (void); |
||||
|
||||
int |
||||
main (int argc, char *argv[]) |
||||
{ |
||||
if (myFunc() == 55) |
||||
return 0; |
||||
return 1; |
||||
} |
@ -1,13 +0,0 @@ |
||||
usr/bin/some-0.dll |
||||
usr/bin/some-0.pdb |
||||
usr/lib/some.lib |
||||
usr/bin/noversion.dll |
||||
usr/bin/noversion.pdb |
||||
usr/lib/noversion.lib |
||||
usr/bin/onlyversion-1.dll |
||||
usr/lib/onlyversion.lib |
||||
usr/bin/onlysoversion-5.dll |
||||
usr/lib/onlysoversion.lib |
||||
usr/libexec/customdir.dll |
||||
usr/libexec/customdir.lib |
||||
usr/lib/module.dll |
@ -1,6 +0,0 @@ |
||||
#ifdef _WIN32 |
||||
__declspec(dllexport) |
||||
#endif |
||||
int myFunc() { |
||||
return 55; |
||||
} |
Loading…
Reference in new issue