From 567831a693a98e9c6b021f58fa22ddc3da83c490 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Mon, 5 Jun 2017 14:35:44 +0200 Subject: [PATCH] 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)