diff options
Diffstat (limited to 'meson/test cases/objc/4 c++ project objc subproject')
4 files changed, 26 insertions, 0 deletions
diff --git a/meson/test cases/objc/4 c++ project objc subproject/master.cpp b/meson/test cases/objc/4 c++ project objc subproject/master.cpp new file mode 100644 index 000000000..cd08fb15e --- /dev/null +++ b/meson/test cases/objc/4 c++ project objc subproject/master.cpp @@ -0,0 +1,11 @@ + +#include <iostream> + +extern "C" +int foo(); + +int main(void) { + std::cout << "Starting\n"; + std::cout << foo() << "\n"; + return 0; +} diff --git a/meson/test cases/objc/4 c++ project objc subproject/meson.build b/meson/test cases/objc/4 c++ project objc subproject/meson.build new file mode 100644 index 000000000..8a77dedce --- /dev/null +++ b/meson/test cases/objc/4 c++ project objc subproject/meson.build @@ -0,0 +1,6 @@ +project('master', ['cpp']) + +foo = subproject('foo') +dep = foo.get_variable('foo_dep') + +executable('master', 'master.cpp', dependencies: dep) diff --git a/meson/test cases/objc/4 c++ project objc subproject/subprojects/foo/foo.m b/meson/test cases/objc/4 c++ project objc subproject/subprojects/foo/foo.m new file mode 100644 index 000000000..e193b8681 --- /dev/null +++ b/meson/test cases/objc/4 c++ project objc subproject/subprojects/foo/foo.m @@ -0,0 +1,4 @@ + +int foo() { + return 42; +} diff --git a/meson/test cases/objc/4 c++ project objc subproject/subprojects/foo/meson.build b/meson/test cases/objc/4 c++ project objc subproject/subprojects/foo/meson.build new file mode 100644 index 000000000..2dbf8ab26 --- /dev/null +++ b/meson/test cases/objc/4 c++ project objc subproject/subprojects/foo/meson.build @@ -0,0 +1,5 @@ +project('foo', ['objc']) + +l = static_library('foo', 'foo.m') + +foo_dep = declare_dependency(link_with : l) |