meson.build 698 B

123456789101112131415161718192021222324252627282930
  1. subdir('dep2')
  2. dep1sources = ['dep1.c', 'dep1.h']
  3. # Do not need to link to dep2lib because we don't use any symbols from it
  4. dep1lib = shared_library(
  5. 'dep1lib',
  6. sources : dep1sources,
  7. dependencies : gobj,
  8. install : true
  9. )
  10. # But the gir does need it because it we use the MesonDep2* structure defined
  11. # in the header
  12. dep1gir = gnome.generate_gir(
  13. dep1lib,
  14. sources : dep1sources,
  15. nsversion : '1.0',
  16. namespace : 'MesonDep1',
  17. symbol_prefix : 'meson',
  18. identifier_prefix : 'Meson',
  19. includes : ['GObject-2.0', 'MesonDep2-1.0'],
  20. dependencies : [dep2_dep],
  21. install : true
  22. )
  23. dep1_dep = declare_dependency(link_with : dep1lib,
  24. dependencies : [dep2_dep],
  25. sources : [dep1gir])