meson.build 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # Convenience library for the duplicated logging functionality
  2. common_sources = [
  3. 'logging.c',
  4. 'governors-query.c',
  5. 'gpu-control.c',
  6. ]
  7. daemon_common = static_library(
  8. 'daemon-common',
  9. sources: common_sources,
  10. install: false,
  11. )
  12. link_daemon_common = declare_dependency(
  13. link_with: daemon_common,
  14. )
  15. # Main daemon
  16. daemon_sources = [
  17. 'main.c',
  18. 'gamemode.c',
  19. 'gamemode-env.c',
  20. 'gamemode-ioprio.c',
  21. 'gamemode-proc.c',
  22. 'gamemode-sched.c',
  23. 'gamemode-wine.c',
  24. 'gamemode-tests.c',
  25. 'gamemode-gpu.c',
  26. 'daemonize.c',
  27. 'dbus_messaging.c',
  28. 'external-helper.c',
  29. 'daemon_config.c',
  30. ]
  31. gamemoded_includes = libgamemode_includes
  32. gamemoded_includes += config_h_dir
  33. executable(
  34. 'gamemoded',
  35. sources: daemon_sources,
  36. dependencies: [
  37. link_daemon_common,
  38. dep_threads,
  39. dep_systemd,
  40. inih_dependency,
  41. libdl,
  42. ],
  43. include_directories: gamemoded_includes,
  44. install: true,
  45. )
  46. # Small target util to get and set cpu governors
  47. cpugovctl_sources = [
  48. 'cpugovctl.c',
  49. ]
  50. cpugovctl = executable(
  51. 'cpugovctl',
  52. sources: cpugovctl_sources,
  53. dependencies: [
  54. link_daemon_common,
  55. ],
  56. install: true,
  57. install_dir: path_libexecdir,
  58. )
  59. # Small target util to get and set gpu clocks values
  60. gpuclockctl_sources = [
  61. 'gpuclockctl.c',
  62. ]
  63. gpuclockctl = executable(
  64. 'gpuclockctl',
  65. sources: gpuclockctl_sources,
  66. dependencies: [
  67. link_daemon_common,
  68. ],
  69. install: true,
  70. install_dir: path_libexecdir,
  71. )