meson.build 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. project('gamemode', 'c',
  2. version : '0.1',
  3. license : 'BSD' )
  4. cc = meson.get_compiler('c')
  5. libsystemd = cc.find_library('systemd')
  6. libdl = cc.find_library('dl')
  7. executable( 'gamemoded',
  8. 'daemon/main.c',
  9. 'daemon/gamemode.c',
  10. 'daemon/logging.c',
  11. 'daemon/daemonize.c',
  12. 'daemon/dbus_messaging.c',
  13. 'daemon/governors.c',
  14. dependencies: libsystemd,
  15. install: true )
  16. # Main client library to message the daemon
  17. shared_library( 'gamemode',
  18. 'lib/client_impl.c',
  19. dependencies: libsystemd,
  20. install : true )
  21. # install the service file
  22. install_data( 'data/gamemoded.service', install_dir: '/etc/systemd/user' )
  23. # Small target util to get and set cpu governors
  24. executable( 'cpugovctl',
  25. 'daemon/cpugovctl.c',
  26. 'daemon/logging.c',
  27. install : true )
  28. # Give cpugovctl the permissions it needs
  29. meson.add_install_script( 'data/cpugovctl_perms.sh',
  30. dependencies : 'cpugovctl' )
  31. # Small library to automatically use gamemode
  32. shared_library( 'gamemodeauto',
  33. 'lib/client_loader.c',
  34. dependencies : libdl,
  35. install : true )
  36. # Install the gamemode_client header
  37. install_headers( 'lib/gamemode_client.h' )
  38. # An example game
  39. libdir = include_directories('lib')
  40. executable( 'example',
  41. 'example/main.c',
  42. dependencies : libdl,
  43. include_directories : libdir )