meson.build 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. dep_systemd,
  15. ],
  16. install: true,
  17. soversion: lt_current,
  18. version: lt_version,
  19. )
  20. libgamemode_includes = [
  21. include_directories('.'),
  22. ]
  23. # Small library to automatically use gamemode
  24. gamemodeauto = shared_library(
  25. 'gamemodeauto',
  26. sources: [
  27. 'client_loader.c',
  28. ],
  29. dependencies: [
  30. libdl,
  31. ],
  32. install: true,
  33. soversion: lt_current,
  34. version: lt_version,
  35. )
  36. # Install the gamemode_client header
  37. gamemode_headers = [
  38. 'gamemode_client.h',
  39. ]
  40. install_headers(gamemode_headers)
  41. # Generate a pkg-config files
  42. pkg = import('pkgconfig')
  43. desc = 'GameMode temporarily applies game specific optimisations to the host OS.'
  44. pkg.generate(
  45. name: 'gamemode',
  46. description: desc,
  47. filebase: 'gamemode',
  48. version: meson.project_version(),
  49. libraries: [
  50. libdl
  51. ],
  52. )
  53. pkg.generate(
  54. name: 'gamemode',
  55. description: desc,
  56. filebase: 'gamemode-auto',
  57. libraries: gamemodeauto,
  58. version: meson.project_version(),
  59. libraries_private: [
  60. libdl
  61. ],
  62. )