meson.build 1.3 KB

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