meson.build 545 B

1234567891011121314
  1. project('shared module', 'c')
  2. dl = meson.get_compiler('c').find_library('dl', required : false)
  3. l = shared_library('runtime', 'runtime.c')
  4. # Do NOT link the module with the runtime library. This
  5. # is a common approach for plugins that are only used
  6. # with dlopen. Any symbols are resolved dynamically
  7. # at runtime. This requires extra help on Windows, so
  8. # should be avoided unless really necessary.
  9. m = shared_module('mymodule', 'module.c')
  10. e = executable('prog', 'prog.c', link_with : l, dependencies : dl)
  11. test('import test', e, args : m)