2019-04-19 16:14:03 +08:00
|
|
|
project('cmakeSubTest', ['c', 'cpp'])
|
2019-02-22 04:30:42 +08:00
|
|
|
|
2019-05-28 22:57:10 +08:00
|
|
|
cm = import('cmake')
|
|
|
|
|
|
|
|
sub_pro = cm.subproject('cmMod')
|
2020-10-13 22:47:23 +08:00
|
|
|
sub_dep = sub_pro.dependency('cmModLib++', include_type: 'system')
|
2019-05-28 22:57:10 +08:00
|
|
|
|
2020-02-19 07:03:21 +08:00
|
|
|
assert(sub_pro.found(), 'found() method reports not found, but should be found')
|
2020-01-31 17:22:07 +08:00
|
|
|
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')
|
2020-10-13 22:47:23 +08:00
|
|
|
assert(sub_dep.include_type() == 'system', 'the include_type kwarg of dependency() works')
|
2019-02-22 04:30:42 +08:00
|
|
|
|
2019-02-23 18:50:46 +08:00
|
|
|
exe1 = executable('main', ['main.cpp'], dependencies: [sub_dep])
|
2019-02-22 04:30:42 +08:00
|
|
|
test('test1', exe1)
|