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.
This commit is contained in:
parent
9c524ee3a6
commit
567831a693
1 changed files with 6 additions and 4 deletions
|
@ -12,8 +12,10 @@ source_c = [
|
||||||
'external/stb_vorbis.c',
|
'external/stb_vorbis.c',
|
||||||
]
|
]
|
||||||
|
|
||||||
raylib = shared_library('raylib',
|
# use 'meson --default-library=static builddir' to build as static, if no builddir yet exists
|
||||||
source_c,
|
# use 'mesonconf -Ddefault_library=static builddir' to change the type
|
||||||
dependencies : [ glfw_dep, gl_dep, openal_dep, m_dep, x11_dep],
|
raylib = library('raylib',
|
||||||
install : true)
|
source_c,
|
||||||
|
dependencies : [ glfw_dep, gl_dep, openal_dep, m_dep, x11_dep],
|
||||||
|
install : true)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue