| 1 |
project('shared library test', 'c', default_options : ['default_library=shared']) |
| 2 |
lib = shared_library('mylib', 'libfile.c') |
| 3 |
build_target('mylib2', 'libfile.c', target_type: 'shared_library') |
| 4 |
|
| 5 |
has_not_changed = false |
| 6 |
if is_disabler(lib) |
| 7 |
has_not_changed = true |
| 8 |
else |
| 9 |
has_not_changed = true |
| 10 |
endif |
| 11 |
assert(has_not_changed, 'Shared library has changed.') |
| 12 |
|
| 13 |
assert(not is_disabler(lib), 'Shared library is a disabler.') |
| 14 |
|
| 15 |
if get_option('default_library') == 'shared' |
| 16 |
library('mylib5', 'libfile2.c', c_shared_args : ['-DWORK']) |
| 17 |
endif |
| 18 |
build_target('mylib4', 'libfile2.c', target_type: 'shared_library', c_shared_args : ['-DWORK'], c_static_args : ['-DBREAK'], link_args : '') |