summaryrefslogtreecommitdiffstats
path: root/test cases/linuxlike/8 subproject library install
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test cases/linuxlike/8 subproject library install/meson.build10
-rw-r--r--test cases/linuxlike/8 subproject library install/subprojects/sublib/include/subdefs.h21
-rw-r--r--test cases/linuxlike/8 subproject library install/subprojects/sublib/meson.build10
-rw-r--r--test cases/linuxlike/8 subproject library install/subprojects/sublib/sublib.c5
-rw-r--r--test cases/linuxlike/8 subproject library install/test.json7
5 files changed, 53 insertions, 0 deletions
diff --git a/test cases/linuxlike/8 subproject library install/meson.build b/test cases/linuxlike/8 subproject library install/meson.build
new file mode 100644
index 0000000..ff55799
--- /dev/null
+++ b/test cases/linuxlike/8 subproject library install/meson.build
@@ -0,0 +1,10 @@
+project('subproj lib install', 'c',
+ version : '2.3.4',
+ license : 'mylicense')
+
+if host_machine.system() == 'cygwin'
+ error('MESON_SKIP_TEST linuxlike soversions not supported on Cygwin.')
+endif
+
+# Test that the subproject library gets installed
+subproject('sublib', version : '1.0.0')
diff --git a/test cases/linuxlike/8 subproject library install/subprojects/sublib/include/subdefs.h b/test cases/linuxlike/8 subproject library install/subprojects/sublib/include/subdefs.h
new file mode 100644
index 0000000..6ae8462
--- /dev/null
+++ b/test cases/linuxlike/8 subproject library install/subprojects/sublib/include/subdefs.h
@@ -0,0 +1,21 @@
+#ifndef SUBDEFS_H_
+#define SUBDEFS_H_
+
+#if defined _WIN32 || defined __CYGWIN__
+#if defined BUILDING_SUB
+ #define DLL_PUBLIC __declspec(dllexport)
+#else
+ #define DLL_PUBLIC __declspec(dllimport)
+#endif
+#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 subfunc(void);
+
+#endif
diff --git a/test cases/linuxlike/8 subproject library install/subprojects/sublib/meson.build b/test cases/linuxlike/8 subproject library install/subprojects/sublib/meson.build
new file mode 100644
index 0000000..97658fa
--- /dev/null
+++ b/test cases/linuxlike/8 subproject library install/subprojects/sublib/meson.build
@@ -0,0 +1,10 @@
+project('subproject', 'c',
+ version : '1.0.0',
+ license : ['sublicense1', 'sublicense2'])
+
+i = include_directories('include')
+shared_library('sublib', 'sublib.c',
+ version : '2.1.0',
+ soversion : 5,
+ include_directories : i, install : true,
+ c_args : '-DBUILDING_SUB=2')
diff --git a/test cases/linuxlike/8 subproject library install/subprojects/sublib/sublib.c b/test cases/linuxlike/8 subproject library install/subprojects/sublib/sublib.c
new file mode 100644
index 0000000..f71564f
--- /dev/null
+++ b/test cases/linuxlike/8 subproject library install/subprojects/sublib/sublib.c
@@ -0,0 +1,5 @@
+#include<subdefs.h>
+
+int DLL_PUBLIC subfunc(void) {
+ return 42;
+}
diff --git a/test cases/linuxlike/8 subproject library install/test.json b/test cases/linuxlike/8 subproject library install/test.json
new file mode 100644
index 0000000..5a2bf04
--- /dev/null
+++ b/test cases/linuxlike/8 subproject library install/test.json
@@ -0,0 +1,7 @@
+{
+ "installed": [
+ {"type": "file", "file": "usr/lib/libsublib.so"},
+ {"type": "file", "file": "usr/lib/libsublib.so.5"},
+ {"type": "file", "file": "usr/lib/libsublib.so.2.1.0"}
+ ]
+}