diff options
Diffstat (limited to '')
4 files changed, 38 insertions, 0 deletions
diff --git a/test cases/common/24 library versions/lib.c b/test cases/common/24 library versions/lib.c new file mode 100644 index 0000000..e49cb2d --- /dev/null +++ b/test cases/common/24 library versions/lib.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 myFunc(void) { + return 55; +} diff --git a/test cases/common/24 library versions/meson.build b/test cases/common/24 library versions/meson.build new file mode 100644 index 0000000..2e2bef7 --- /dev/null +++ b/test cases/common/24 library versions/meson.build @@ -0,0 +1,9 @@ +project('library versions', 'c') + +shared_library('somelib', 'lib.c', + name_prefix : 'prefix', + name_suffix : 'suffix', + install_dir : 'lib', + install : true) + +subdir('subdir') diff --git a/test cases/common/24 library versions/subdir/meson.build b/test cases/common/24 library versions/subdir/meson.build new file mode 100644 index 0000000..a83fdb5 --- /dev/null +++ b/test cases/common/24 library versions/subdir/meson.build @@ -0,0 +1,8 @@ +# Test that using files generated with configure_file as sources works. +# We do this inside a subdir so that the path isn't accidentally correct +# because there is no structure in the build dir. +genlib = configure_file(input : '../lib.c', + output : 'genlib.c', + copy: true) +shared_library('genlib', genlib, + install : false) diff --git a/test cases/common/24 library versions/test.json b/test cases/common/24 library versions/test.json new file mode 100644 index 0000000..64b7ab0 --- /dev/null +++ b/test cases/common/24 library versions/test.json @@ -0,0 +1,7 @@ +{ + "installed": [ + {"type": "file", "file": "usr/lib/prefixsomelib.suffix"}, + {"type": "implib", "file": "usr/lib/prefixsomelib"}, + {"type": "pdb", "file": "usr/lib/prefixsomelib"} + ] +} |