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')
|
|
|
|
sub_dep = sub_pro.dependency('cmModLib')
|
|
|
|
|
|
|
|
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')
|
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)
|