summaryrefslogtreecommitdiffstats
path: root/test cases/windows/20 vs install static lib with generated obj deps
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test cases/windows/20 vs install static lib with generated obj deps/both_lib_source.c7
-rw-r--r--test cases/windows/20 vs install static lib with generated obj deps/copyfile.py4
-rw-r--r--test cases/windows/20 vs install static lib with generated obj deps/generated_source.c4
-rw-r--r--test cases/windows/20 vs install static lib with generated obj deps/meson.build20
-rw-r--r--test cases/windows/20 vs install static lib with generated obj deps/static_lib_source.c6
-rw-r--r--test cases/windows/20 vs install static lib with generated obj deps/test.json13
6 files changed, 54 insertions, 0 deletions
diff --git a/test cases/windows/20 vs install static lib with generated obj deps/both_lib_source.c b/test cases/windows/20 vs install static lib with generated obj deps/both_lib_source.c
new file mode 100644
index 0000000..aa926b1
--- /dev/null
+++ b/test cases/windows/20 vs install static lib with generated obj deps/both_lib_source.c
@@ -0,0 +1,7 @@
+extern int static_lib_function(void);
+extern __declspec(dllexport) int both_lib_function(void);
+
+int both_lib_function(void)
+{
+ return static_lib_function();
+}
diff --git a/test cases/windows/20 vs install static lib with generated obj deps/copyfile.py b/test cases/windows/20 vs install static lib with generated obj deps/copyfile.py
new file mode 100644
index 0000000..738e894
--- /dev/null
+++ b/test cases/windows/20 vs install static lib with generated obj deps/copyfile.py
@@ -0,0 +1,4 @@
+from shutil import copyfile
+import sys
+
+copyfile(sys.argv[1], sys.argv[2])
diff --git a/test cases/windows/20 vs install static lib with generated obj deps/generated_source.c b/test cases/windows/20 vs install static lib with generated obj deps/generated_source.c
new file mode 100644
index 0000000..8671cbf
--- /dev/null
+++ b/test cases/windows/20 vs install static lib with generated obj deps/generated_source.c
@@ -0,0 +1,4 @@
+int generated_function(void)
+{
+ return 42;
+}
diff --git a/test cases/windows/20 vs install static lib with generated obj deps/meson.build b/test cases/windows/20 vs install static lib with generated obj deps/meson.build
new file mode 100644
index 0000000..bc61772
--- /dev/null
+++ b/test cases/windows/20 vs install static lib with generated obj deps/meson.build
@@ -0,0 +1,20 @@
+project('test', 'c')
+
+generated_c = custom_target(
+ 'generated.c',
+ input : files('generated_source.c', 'copyfile.py'),
+ output : 'generated.c',
+ command : ['python', '@INPUT1@', '@INPUT0@', '@OUTPUT@'],
+)
+
+static_lib = static_library(
+ 'static_lib',
+ [files('static_lib_source.c'), generated_c],
+)
+
+both_lib = both_libraries(
+ 'both_lib',
+ [files('both_lib_source.c')],
+ link_with : [static_lib],
+ install : true,
+)
diff --git a/test cases/windows/20 vs install static lib with generated obj deps/static_lib_source.c b/test cases/windows/20 vs install static lib with generated obj deps/static_lib_source.c
new file mode 100644
index 0000000..e86153a
--- /dev/null
+++ b/test cases/windows/20 vs install static lib with generated obj deps/static_lib_source.c
@@ -0,0 +1,6 @@
+extern int generated_function(void);
+
+int static_lib_function(void)
+{
+ return generated_function();
+}
diff --git a/test cases/windows/20 vs install static lib with generated obj deps/test.json b/test cases/windows/20 vs install static lib with generated obj deps/test.json
new file mode 100644
index 0000000..451da1e
--- /dev/null
+++ b/test cases/windows/20 vs install static lib with generated obj deps/test.json
@@ -0,0 +1,13 @@
+{
+ "installed": [
+ {"type": "file", "file": "usr/lib/libboth_lib.a"},
+
+ {"type": "shared_lib", "platform": "msvc", "file": "usr/bin/both_lib"},
+ {"type": "implib", "platform": "msvc", "file": "usr/lib/both_lib"},
+ {"type": "pdb", "platform": "msvc", "file": "usr/bin/both_lib"},
+
+ {"type": "expr", "platform": "gcc", "file": "usr/lib/?libboth_lib.dll"},
+ {"type": "implib", "platform": "gcc", "file": "usr/lib/libboth_lib"},
+ {"type": "pdb", "platform": "gcc", "file": "usr/bin/libboth_lib"}
+ ]
+}