From 988f5b78329f31c3107ec258e8ac3eb1358dee3b Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Fri, 16 Feb 2018 11:20:21 +0100 Subject: [PATCH] Add Builder project template --- project/Builder/README.md | 20 ++++++++++++++++++++ project/Builder/meson.build | 27 +++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 project/Builder/README.md create mode 100644 project/Builder/meson.build diff --git a/project/Builder/README.md b/project/Builder/README.md new file mode 100644 index 000000000..f816ebe5f --- /dev/null +++ b/project/Builder/README.md @@ -0,0 +1,20 @@ +# Builder project template + +This is a project template to be used with [GNOME Builder](https://raw.githubusercontent.com/jubalh/raymario/master/meson.build). +We use the [meson](https://raw.githubusercontent.com/jubalh/raymario/master/meson.build) build system here. + +We can compile our project via the command line: +``` +meson build +cd build +ninja +ninja install +``` + +Or can simply click on the `meson.build` file to open it with Builder. +Alternatively you can open Builder first and click on the `open` button and the left top. + +We added comments to the file to give you an idea which values you should edit. +For a full overview of options please check the [meson manual](http://mesonbuild.com/Manual.html). + +In the provided file we assume that the build file is located at the root folder of your project, and that all your sources are in a `src` subfolder. diff --git a/project/Builder/meson.build b/project/Builder/meson.build new file mode 100644 index 000000000..4908736cd --- /dev/null +++ b/project/Builder/meson.build @@ -0,0 +1,27 @@ +# This file should be in the main folder of your project + +# Replace 'projectname' with the name of your project +# Replace '1.0' with its version +project('projectname', 'c', version: '1.0', + meson_version: '>= 0.39.1') + +# We want a C Compiler to be present +cc = meson.get_compiler('c') + +# Find dependencies +glfw_dep = dependency('glfw3') +gl_dep = dependency('gl') +openal_dep = dependency('openal') +m_dep = cc.find_library('m', required : false) +raylib_dep = cc.find_library('raylib', required : false) + +# List your source files here +source_c = [ + 'src/main.c', +] + +# Build executable +projectname = executable('projectname', + source_c, + dependencies : [ raylib_dep, glfw_dep, gl_dep, openal_dep, m_dep ], + install : true)