diff options
author | Charadon <dev@iotib.net> | 2022-06-01 17:34:51 -0400 |
---|---|---|
committer | Charadon <dev@iotib.net> | 2022-06-01 17:34:51 -0400 |
commit | 01a21af4c041c6f3133b4202ca35c156ffb00f32 (patch) | |
tree | 7a118b37c09e744325cf3740a62e2857ae839ea0 /meson.build | |
parent | 081187244a0f69a0043d15dd7ad2cf5f127c60be (diff) | |
download | Pong-C-01a21af4c041c6f3133b4202ca35c156ffb00f32.tar.gz |
Migrate to meson
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..5bac36b --- /dev/null +++ b/meson.build @@ -0,0 +1,23 @@ +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 +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]) \ No newline at end of file |