project('Pong', 'c', license : 'GPL-3.0-only', version : '0.1', default_options : ['warning_level=3', 'werror=true', 'optimization=g', 'c_std=c11', 'prefix=/opt']) add_project_link_arguments('../raylib/libraylib.a', '-lm', '-ldl', '-lrt', language : 'c') fs = import('fs') message('Cleaning raylib...') # First clean up run_command('make', '-C', 'raylib/src', 'clean', capture : true, check : true) message('Building raylib...') # Then Build run_command('make', '-C', 'raylib/src', 'PLATFORM=PLATFORM_DESKTOP', 'RAYLIB_BUILD_MODE=RELEASE', capture : true, check : true) if fs.exists('raylib/libraylib.a') == true message('raylib successfully compiled.') else error('raylib failed to compile. Check meson-logs to see what went wrong.') endif Raylib_Include = include_directories('raylib/src') # Install launcher if flatpak if get_option('build_flatpak') == true install_data('src/launch.sh', install_dir : 'bin') endif X11_Dep = dependency('x11') Threads_Dep = dependency('threads') GL_Dep = dependency('gl') Sources = ['src/main.c', 'src/enemy.c', 'src/ball.c', 'src/title.c'] executable('pong', Sources, dependencies : [X11_Dep, Threads_Dep, GL_Dep], install : true, install_dir : 'Pong', include_directories : Raylib_Include) install_subdir('resources', install_dir : 'Pong')