From 1adc0313015b30cf061a3bc9d47292f82dc649f8 Mon Sep 17 00:00:00 2001 From: Michael Campagnaro Date: Tue, 30 May 2017 13:04:59 -0400 Subject: [PATCH 1/3] Fix link in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d3328c2cd..06e2183c7 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ features * Basic 3d support for Geometrics, Models, Billboards, Heightmaps and Cubicmaps * Flexible Materials system, supporting by default diffuse, normal and specular maps * Shaders support, including Model shaders and Postprocessing shaders - * Powerful math module for Vector, Matrix and Quaternion operations: [raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.c) + * Powerful math module for Vector, Matrix and Quaternion operations: [raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h) * Audio loading and playing with streaming support (WAV, OGG, FLAC, XM, MOD) * Multiple platforms support: Windows, Linux, Mac, **Android**, **Raspberry Pi** and **HTML5** * VR stereo rendering support with configurable HMD device parameters From 9c524ee3a66953244b6a849f1161f43b22032724 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Sun, 4 Jun 2017 23:21:41 +0200 Subject: [PATCH 2/3] Add meson files for basic Linux building --- .gitignore | 2 ++ meson.build | 14 ++++++++++++++ src/meson.build | 19 +++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 meson.build create mode 100644 src/meson.build diff --git a/.gitignore b/.gitignore index 7e2768293..99b04ee44 100644 --- a/.gitignore +++ b/.gitignore @@ -129,3 +129,5 @@ src/libraylib.bc !release/rpi/libraylib.a !release/win32/mingw32/raylib.dll +# Meson build system +builddir/ diff --git a/meson.build b/meson.build new file mode 100644 index 000000000..4ac6c3173 --- /dev/null +++ b/meson.build @@ -0,0 +1,14 @@ +project('raylib', 'c', version: '1.7.0', + license: 'zlib', + meson_version: '>= 0.39.1') + +cc = meson.get_compiler('c') + +glfw_dep = dependency('glfw3') +gl_dep = dependency('gl') +openal_dep = dependency('openal') +x11_dep = dependency('x11') +m_dep = cc.find_library('m', required : false) + +subdir('src') + diff --git a/src/meson.build b/src/meson.build new file mode 100644 index 000000000..f416e6655 --- /dev/null +++ b/src/meson.build @@ -0,0 +1,19 @@ +install_headers('raylib.h') + +source_c = [ + 'audio.c', + 'core.c', + 'models.c', + 'rlgl.c', + 'shapes.c', + 'text.c', + 'textures.c', + 'utils.c', + 'external/stb_vorbis.c', +] + +raylib = shared_library('raylib', + source_c, + dependencies : [ glfw_dep, gl_dep, openal_dep, m_dep, x11_dep], + install : true) + From 567831a693a98e9c6b021f58fa22ddc3da83c490 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Mon, 5 Jun 2017 14:35:44 +0200 Subject: [PATCH 3/3] Allow static/dynamic library building with meson Using the library() function instead of shared_library() allows changing of the library type via the default_library option. This allows for easy change between static and dynamic library building. Use 'meson --default-library=static builddir' to build as static, if no builddir yet exists. Use 'mesonconf -Ddefault_library=static builddir' to change the type for an existing builddir. --- src/meson.build | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/meson.build b/src/meson.build index f416e6655..1b84e6f37 100644 --- a/src/meson.build +++ b/src/meson.build @@ -12,8 +12,10 @@ source_c = [ 'external/stb_vorbis.c', ] -raylib = shared_library('raylib', - source_c, - dependencies : [ glfw_dep, gl_dep, openal_dep, m_dep, x11_dep], - install : true) +# use 'meson --default-library=static builddir' to build as static, if no builddir yet exists +# use 'mesonconf -Ddefault_library=static builddir' to change the type +raylib = library('raylib', + source_c, + dependencies : [ glfw_dep, gl_dep, openal_dep, m_dep, x11_dep], + install : true)