diff options
| author | Jon Turney <jon.turney@dronecode.org.uk> | 2018-10-31 12:31:10 +0000 |
|---|---|---|
| committer | Jon Turney <jon.turney@dronecode.org.uk> | 2018-11-06 13:17:12 +0000 |
| commit | b17f6dae541ec9744e82c2cb6f1c31c9a76b45f5 (patch) | |
| tree | e5b59a95a1e9a83965d66a8d284cebda01b594c1 /test cases | |
| parent | 7a959ffbba6a410a25ec4fef6a6ff039d8c604e2 (diff) | |
| download | meson-b17f6dae541ec9744e82c2cb6f1c31c9a76b45f5.tar.gz | |
Add a test of installed library names when name_{suf,pre}fix: is used
Extend platform_fix_name() to handle this case
We avoid using library(version:), so we don't have to teach
platform_fix_name() all the platform details of versioned shared library
naming. Hopefully that's exercised by platform-specific tests...
Diffstat (limited to 'test cases')
3 files changed, 31 insertions, 0 deletions
diff --git a/test cases/common/207 install name_prefix name_suffix/installed_files.txt b/test cases/common/207 install name_prefix name_suffix/installed_files.txt new file mode 100644 index 000000000..d590591c4 --- /dev/null +++ b/test cases/common/207 install name_prefix name_suffix/installed_files.txt @@ -0,0 +1,10 @@ +?msvc:usr/bin/baz.pdb +?msvc:usr/bin/foo.pdb +?msvc:usr/lib/baz.pdb +?msvc:usr/lib/foo.pdb +usr/lib/?libbaz.cheese +usr/lib/bar.a +usr/lib/foo?implib +usr/lib/foo?so +usr/lib/libbaz?implib +usr/lib/libqux.cheese diff --git a/test cases/common/207 install name_prefix name_suffix/libfile.c b/test cases/common/207 install name_prefix name_suffix/libfile.c new file mode 100644 index 000000000..44f7667d4 --- /dev/null +++ b/test cases/common/207 install name_prefix name_suffix/libfile.c @@ -0,0 +1,14 @@ +#if defined _WIN32 || defined __CYGWIN__ + #define DLL_PUBLIC __declspec(dllexport) +#else + #if defined __GNUC__ + #define DLL_PUBLIC __attribute__ ((visibility("default"))) + #else + #pragma message ("Compiler does not support symbol visibility.") + #define DLL_PUBLIC + #endif +#endif + +int DLL_PUBLIC func() { + return 0; +} diff --git a/test cases/common/207 install name_prefix name_suffix/meson.build b/test cases/common/207 install name_prefix name_suffix/meson.build new file mode 100644 index 000000000..1ae98b6e9 --- /dev/null +++ b/test cases/common/207 install name_prefix name_suffix/meson.build @@ -0,0 +1,7 @@ +project('library with name_prefix name_suffix test', 'c') + +shared_library('foo', 'libfile.c', name_prefix: '', install : true) +static_library('bar', 'libfile.c', name_prefix: '', install : true) + +shared_library('baz', 'libfile.c', name_suffix: 'cheese', install : true) +static_library('qux', 'libfile.c', name_suffix: 'cheese', install : true) |
