aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/common/88 dep fallback/subprojects/boblib
diff options
context:
space:
mode:
Diffstat (limited to 'meson/test cases/common/88 dep fallback/subprojects/boblib')
-rw-r--r--meson/test cases/common/88 dep fallback/subprojects/boblib/bob.c8
-rw-r--r--meson/test cases/common/88 dep fallback/subprojects/boblib/bob.h6
-rw-r--r--meson/test cases/common/88 dep fallback/subprojects/boblib/genbob.py6
-rw-r--r--meson/test cases/common/88 dep fallback/subprojects/boblib/meson.build18
4 files changed, 38 insertions, 0 deletions
diff --git a/meson/test cases/common/88 dep fallback/subprojects/boblib/bob.c b/meson/test cases/common/88 dep fallback/subprojects/boblib/bob.c
new file mode 100644
index 000000000..52cf4795e
--- /dev/null
+++ b/meson/test cases/common/88 dep fallback/subprojects/boblib/bob.c
@@ -0,0 +1,8 @@
+#include"bob.h"
+
+#ifdef _MSC_VER
+__declspec(dllexport)
+#endif
+const char* get_bob(void) {
+ return "bob";
+}
diff --git a/meson/test cases/common/88 dep fallback/subprojects/boblib/bob.h b/meson/test cases/common/88 dep fallback/subprojects/boblib/bob.h
new file mode 100644
index 000000000..8dd4b334d
--- /dev/null
+++ b/meson/test cases/common/88 dep fallback/subprojects/boblib/bob.h
@@ -0,0 +1,6 @@
+#pragma once
+
+#ifdef _MSC_VER
+__declspec(dllimport)
+#endif
+const char* get_bob(void);
diff --git a/meson/test cases/common/88 dep fallback/subprojects/boblib/genbob.py b/meson/test cases/common/88 dep fallback/subprojects/boblib/genbob.py
new file mode 100644
index 000000000..34af7790e
--- /dev/null
+++ b/meson/test cases/common/88 dep fallback/subprojects/boblib/genbob.py
@@ -0,0 +1,6 @@
+#!/usr/bin/env python3
+
+import sys
+
+with open(sys.argv[1], 'w') as f:
+ f.write('')
diff --git a/meson/test cases/common/88 dep fallback/subprojects/boblib/meson.build b/meson/test cases/common/88 dep fallback/subprojects/boblib/meson.build
new file mode 100644
index 000000000..0a72a828d
--- /dev/null
+++ b/meson/test cases/common/88 dep fallback/subprojects/boblib/meson.build
@@ -0,0 +1,18 @@
+project('bob', 'c')
+
+gensrc_py = find_program('genbob.py')
+genbob_h = custom_target('genbob.h',
+ output : 'genbob.h',
+ command : [gensrc_py, '@OUTPUT@'])
+genbob_c = custom_target('genbob.c',
+ output : 'genbob.c',
+ command : [gensrc_py, '@OUTPUT@'])
+
+boblib = library('bob', ['bob.c', genbob_c])
+bobinc = include_directories('.')
+
+bob_dep = declare_dependency(link_with : boblib,
+ sources : [genbob_h],
+ include_directories : bobinc)
+
+notfound_dep = dependency('', required: false)