| 1 |
project('cmake_object_lib_test', ['c', 'cpp']) |
| 2 |
|
| 3 |
dep_test = dependency('ZLIB', method: 'cmake', required: false) |
| 4 |
if not dep_test.found() |
| 5 |
error('MESON_SKIP_TEST: zlib is not installed') |
| 6 |
endif |
| 7 |
|
| 8 |
cm = import('cmake') |
| 9 |
|
| 10 |
sub_pro = cm.subproject('cmObjLib') |
| 11 |
sub_sha = sub_pro.dependency('lib_sha') |
| 12 |
sub_sta = sub_pro.dependency('lib_sta') |
| 13 |
|
| 14 |
# Required for the static library |
| 15 |
zlib_dep = dependency('zlib') |
| 16 |
|
| 17 |
exe_sha = executable('shared', ['main.cpp'], dependencies: [sub_sha]) |
| 18 |
exe_sta = executable('static', ['main.cpp'], dependencies: [sub_sta, zlib_dep]) |
| 19 |
|
| 20 |
test('test1', exe_sha) |
| 21 |
test('test1', exe_sta) |