aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/common/78 internal dependency
diff options
context:
space:
mode:
Diffstat (limited to 'meson/test cases/common/78 internal dependency')
-rw-r--r--meson/test cases/common/78 internal dependency/meson.build4
-rw-r--r--meson/test cases/common/78 internal dependency/proj1/include/proj1.h5
-rw-r--r--meson/test cases/common/78 internal dependency/proj1/meson.build11
-rw-r--r--meson/test cases/common/78 internal dependency/proj1/proj1f1.c6
-rw-r--r--meson/test cases/common/78 internal dependency/proj1/proj1f2.c6
-rw-r--r--meson/test cases/common/78 internal dependency/proj1/proj1f3.c6
-rw-r--r--meson/test cases/common/78 internal dependency/src/main.c10
-rw-r--r--meson/test cases/common/78 internal dependency/src/meson.build2
8 files changed, 50 insertions, 0 deletions
diff --git a/meson/test cases/common/78 internal dependency/meson.build b/meson/test cases/common/78 internal dependency/meson.build
new file mode 100644
index 000000000..6faedb09e
--- /dev/null
+++ b/meson/test cases/common/78 internal dependency/meson.build
@@ -0,0 +1,4 @@
+project('internal dependency', 'c')
+
+subdir('proj1')
+subdir('src')
diff --git a/meson/test cases/common/78 internal dependency/proj1/include/proj1.h b/meson/test cases/common/78 internal dependency/proj1/include/proj1.h
new file mode 100644
index 000000000..ecb1e4b6f
--- /dev/null
+++ b/meson/test cases/common/78 internal dependency/proj1/include/proj1.h
@@ -0,0 +1,5 @@
+#pragma once
+
+void proj1_func1(void);
+void proj1_func2(void);
+void proj1_func3(void);
diff --git a/meson/test cases/common/78 internal dependency/proj1/meson.build b/meson/test cases/common/78 internal dependency/proj1/meson.build
new file mode 100644
index 000000000..422021edb
--- /dev/null
+++ b/meson/test cases/common/78 internal dependency/proj1/meson.build
@@ -0,0 +1,11 @@
+incdirs = include_directories('include')
+
+p1lib = static_library('proj1', 'proj1f1.c',
+ include_directories : incdirs
+)
+
+indirect_source = files('proj1f2.c')
+
+proj1_dep = declare_dependency(include_directories : incdirs,
+ link_with : p1lib,
+ sources : ['proj1f3.c', indirect_source])
diff --git a/meson/test cases/common/78 internal dependency/proj1/proj1f1.c b/meson/test cases/common/78 internal dependency/proj1/proj1f1.c
new file mode 100644
index 000000000..69fa823e1
--- /dev/null
+++ b/meson/test cases/common/78 internal dependency/proj1/proj1f1.c
@@ -0,0 +1,6 @@
+#include<proj1.h>
+#include<stdio.h>
+
+void proj1_func1(void) {
+ printf("In proj1_func1.\n");
+}
diff --git a/meson/test cases/common/78 internal dependency/proj1/proj1f2.c b/meson/test cases/common/78 internal dependency/proj1/proj1f2.c
new file mode 100644
index 000000000..7dd621c3a
--- /dev/null
+++ b/meson/test cases/common/78 internal dependency/proj1/proj1f2.c
@@ -0,0 +1,6 @@
+#include<proj1.h>
+#include<stdio.h>
+
+void proj1_func2(void) {
+ printf("In proj1_func2.\n");
+}
diff --git a/meson/test cases/common/78 internal dependency/proj1/proj1f3.c b/meson/test cases/common/78 internal dependency/proj1/proj1f3.c
new file mode 100644
index 000000000..2861ddcf6
--- /dev/null
+++ b/meson/test cases/common/78 internal dependency/proj1/proj1f3.c
@@ -0,0 +1,6 @@
+#include<proj1.h>
+#include<stdio.h>
+
+void proj1_func3(void) {
+ printf("In proj1_func3.\n");
+}
diff --git a/meson/test cases/common/78 internal dependency/src/main.c b/meson/test cases/common/78 internal dependency/src/main.c
new file mode 100644
index 000000000..dbb7c4a06
--- /dev/null
+++ b/meson/test cases/common/78 internal dependency/src/main.c
@@ -0,0 +1,10 @@
+#include<stdio.h>
+#include<proj1.h>
+
+int main(void) {
+ printf("Now calling into library.\n");
+ proj1_func1();
+ proj1_func2();
+ proj1_func3();
+ return 0;
+}
diff --git a/meson/test cases/common/78 internal dependency/src/meson.build b/meson/test cases/common/78 internal dependency/src/meson.build
new file mode 100644
index 000000000..89f99abd1
--- /dev/null
+++ b/meson/test cases/common/78 internal dependency/src/meson.build
@@ -0,0 +1,2 @@
+exe = executable('projtest', 'main.c', dependencies : proj1_dep)
+test('projtest', exe)