From af1a266670d040d2f4083ff309d732d648afba2a Mon Sep 17 00:00:00 2001 From: Angelos Mouzakitis Date: Tue, 10 Oct 2023 14:33:42 +0000 Subject: Add submodule dependency files Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec --- meson/test cases/cmake/1 basic/meson.build | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 meson/test cases/cmake/1 basic/meson.build (limited to 'meson/test cases/cmake/1 basic/meson.build') diff --git a/meson/test cases/cmake/1 basic/meson.build b/meson/test cases/cmake/1 basic/meson.build new file mode 100644 index 000000000..246473904 --- /dev/null +++ b/meson/test cases/cmake/1 basic/meson.build @@ -0,0 +1,14 @@ +project('cmakeSubTest', ['c', 'cpp']) + +cm = import('cmake') + +sub_pro = cm.subproject('cmMod') +sub_dep = sub_pro.dependency('cmModLib++', include_type: 'system') + +assert(sub_pro.found(), 'found() method reports not found, but should be found') +assert(sub_pro.target_list() == ['cmModLib++'], 'There should be exactly one target') +assert(sub_pro.target_type('cmModLib++') == 'shared_library', 'Target type should be shared_library') +assert(sub_dep.include_type() == 'system', 'the include_type kwarg of dependency() works') + +exe1 = executable('main', ['main.cpp'], dependencies: [sub_dep]) +test('test1', exe1) -- cgit 1.2.3-korg