gamemode/meson.build
Marc Di Luzio c459c05076 Initial 0.1 commit
This is a small daemon/libary to enable games to request a
performance "game mode" from the system.

Currently only implemented to upgrade the CPU governor and
automatically downgrade it once done.

A game only needs to load libgamemodeauto to activate the request.
Which means an LD_PRELOAD can be applied to any game to activate
the mode as needed.

However gamemode_client.h can be used to manually activate/deactivate
the mode as needed, and also perform error checking.

The libs are miminal loaders to call into an installed libgamemode
which, if the daemon is installed and running, will send through
the equivelant game mode request, and magic will happen.

See the README.md for more details.

Currently licensed under the BSD 3 clause license.
2018-03-05 17:32:01 +00:00

54 lines
1.2 KiB
Meson

project('gamemode', 'c',
version : '0.1',
license : 'BSD' )
cc = meson.get_compiler('c')
libsystemd = cc.find_library('systemd')
libdl = cc.find_library('dl')
executable( 'gamemoded',
'daemon/main.c',
'daemon/gamemode.c',
'daemon/logging.c',
'daemon/daemonize.c',
'daemon/dbus_messaging.c',
'daemon/governors.c',
dependencies: libsystemd,
install: true )
# Main client library to message the daemon
shared_library( 'gamemode',
'lib/client_impl.c',
dependencies: libsystemd,
install : true )
# install the service file
install_data( 'data/gamemoded.service', install_dir: '/etc/systemd/user' )
# Small target util to get and set cpu governors
executable( 'cpugovctl',
'daemon/cpugovctl.c',
'daemon/logging.c',
install : true )
# Give cpugovctl the permissions it needs
meson.add_install_script( 'data/cpugovctl_perms.sh',
dependencies : 'cpugovctl' )
# Small library to automatically use gamemode
shared_library( 'gamemodeauto',
'lib/client_loader.c',
dependencies : libdl,
install : true )
# Install the gamemode_client header
install_headers( 'lib/gamemode_client.h' )
# An example game
libdir = include_directories('lib')
executable( 'example',
'example/main.c',
dependencies : libdl,
include_directories : libdir )