2016-12-03 03:55:56 +08:00
|
|
|
project('shared module', 'c')
|
|
|
|
|
2016-12-03 07:11:07 +08:00
|
|
|
dl = meson.get_compiler('c').find_library('dl', required : false)
|
|
|
|
l = shared_library('runtime', 'runtime.c')
|
2016-12-05 02:15:06 +08:00
|
|
|
# Do NOT link the module with the runtime library. This
|
|
|
|
# is a common approach for plugins that are only used
|
|
|
|
# with dlopen. Any symbols are resolved dynamically
|
|
|
|
# at runtime
|
|
|
|
m = shared_module('mymodule', 'module.c')
|
2016-12-03 07:11:07 +08:00
|
|
|
e = executable('prog', 'prog.c', link_with : l, dependencies : dl)
|
2017-01-12 01:30:11 +08:00
|
|
|
test('import test', e, args : m)
|
2016-12-03 03:55:56 +08:00
|
|
|
|