summaryrefslogtreecommitdiffstats
path: root/test cases/common/200 install name_prefix name_suffix
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/common/200 install name_prefix name_suffix')
-rw-r--r--test cases/common/200 install name_prefix name_suffix/libfile.c14
-rw-r--r--test cases/common/200 install name_prefix name_suffix/meson.build13
-rw-r--r--test cases/common/200 install name_prefix name_suffix/test.json19
3 files changed, 46 insertions, 0 deletions
diff --git a/test cases/common/200 install name_prefix name_suffix/libfile.c b/test cases/common/200 install name_prefix name_suffix/libfile.c
new file mode 100644
index 0000000..91489b2
--- /dev/null
+++ b/test cases/common/200 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(void) {
+ return 0;
+}
diff --git a/test cases/common/200 install name_prefix name_suffix/meson.build b/test cases/common/200 install name_prefix name_suffix/meson.build
new file mode 100644
index 0000000..044f915
--- /dev/null
+++ b/test cases/common/200 install name_prefix name_suffix/meson.build
@@ -0,0 +1,13 @@
+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)
+
+shared_library('corge', 'libfile.c', name_prefix: 'bow', name_suffix: 'stern', install : true)
+static_library('grault', 'libfile.c', name_prefix: 'bow', name_suffix: 'stern', install : true)
+
+# exercise default name_prefix and name_suffix
+shared_library('garply', 'libfile.c', name_prefix: [], name_suffix: [], install : true)
diff --git a/test cases/common/200 install name_prefix name_suffix/test.json b/test cases/common/200 install name_prefix name_suffix/test.json
new file mode 100644
index 0000000..b92a985
--- /dev/null
+++ b/test cases/common/200 install name_prefix name_suffix/test.json
@@ -0,0 +1,19 @@
+{
+ "installed": [
+ {"type": "pdb", "file": "usr/bin/baz"},
+ {"type": "pdb", "file": "usr/bin/bowcorge"},
+ {"type": "pdb", "file": "usr/bin/foo"},
+ {"type": "expr", "file": "usr/?lib/bowcorge.stern"},
+ {"type": "expr", "file": "usr/lib/?libbaz.cheese"},
+ {"type": "file", "file": "usr/lib/bar.a"},
+ {"type": "implib", "file": "usr/lib/bowcorge"},
+ {"type": "file", "file": "usr/lib/bowgrault.stern"},
+ {"type": "implib", "file": "usr/lib/foo"},
+ {"type": "expr", "file": "usr/lib/foo?so"},
+ {"type": "implib", "file": "usr/lib/libbaz"},
+ {"type": "file", "file": "usr/lib/libqux.cheese"},
+ {"type": "expr", "file": "usr/?lib/libgarply?so"},
+ {"type": "implib", "file": "usr/lib/libgarply"},
+ {"type": "pdb", "file": "usr/bin/garply"}
+ ]
+}