diff options
Diffstat (limited to 'meson/test cases/common/24 library versions')
4 files changed, 38 insertions, 0 deletions
diff --git a/meson/test cases/common/24 library versions/lib.c b/meson/test cases/common/24 library versions/lib.c new file mode 100644 index 000000000..e49cb2d66 --- /dev/null +++ b/meson/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/meson/test cases/common/24 library versions/meson.build b/meson/test cases/common/24 library versions/meson.build new file mode 100644 index 000000000..2e2bef769 --- /dev/null +++ b/meson/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/meson/test cases/common/24 library versions/subdir/meson.build b/meson/test cases/common/24 library versions/subdir/meson.build new file mode 100644 index 000000000..a83fdb5a9 --- /dev/null +++ b/meson/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/meson/test cases/common/24 library versions/test.json b/meson/test cases/common/24 library versions/test.json new file mode 100644 index 000000000..64b7ab0e0 --- /dev/null +++ b/meson/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"} + ] +} |