meson.build 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # Libtool like versioning (current.revision.age) for the libraries
  2. # See https://www.sourceware.org/autobook/autobook/autobook_61.html#Library-Versioning
  3. lt_current = '0'
  4. lt_revision = '0'
  5. lt_age = '0'
  6. lt_version = '@0@.@1@.@2@'.format(lt_current, lt_age, lt_revision)
  7. # Main client library to message the daemon
  8. gamemode = shared_library(
  9. 'gamemode',
  10. sources: [
  11. 'client_impl.c',
  12. ],
  13. dependencies: [
  14. link_lib_common,
  15. dep_dbus,
  16. ],
  17. install: true,
  18. soversion: lt_current,
  19. version: lt_version,
  20. )
  21. libgamemode_includes = [
  22. include_directories('.'),
  23. ]
  24. # Small library to automatically use gamemode
  25. gamemodeauto = shared_library(
  26. 'gamemodeauto',
  27. sources: [
  28. 'client_loader.c',
  29. ],
  30. dependencies: [
  31. libdl,
  32. ],
  33. install: true,
  34. soversion: lt_current,
  35. version: lt_version,
  36. )
  37. # Install the gamemode_client header
  38. gamemode_headers = [
  39. 'gamemode_client.h',
  40. ]
  41. install_headers(gamemode_headers)
  42. # Generate a pkg-config files
  43. pkg = import('pkgconfig')
  44. desc = 'GameMode temporarily applies game specific optimisations to the host OS.'
  45. pkg.generate(
  46. name: 'gamemode',
  47. description: desc,
  48. filebase: 'gamemode',
  49. version: meson.project_version(),
  50. libraries: [
  51. libdl
  52. ],
  53. )
  54. pkg.generate(
  55. name: 'gamemode',
  56. description: desc,
  57. filebase: 'gamemode-auto',
  58. libraries: gamemodeauto,
  59. version: meson.project_version(),
  60. libraries_private: [
  61. libdl
  62. ],
  63. )