mirror of
https://github.com/nunuhara/xsystem4.git
synced 2026-09-22 23:18:01 +03:00
Collision detection is based on a mesh named "collision" in the map's 3D model. The "collision" mesh specifies the area in which the character can move in the xz plane, and the y coordinate represents the height of the map at that point. Now cglm 0.9.2 is required, for 2D AABB operations.
58 lines
2.2 KiB
Meson
58 lines
2.2 KiB
Meson
project('system4', 'c',
|
|
meson_version: '>= 0.59',
|
|
default_options : ['c_std=c11'])
|
|
add_project_arguments('-D_DEFAULT_SOURCE', language : 'c')
|
|
add_project_arguments('-DXSYS4_DATA_DIR="' + get_option('prefix') / get_option('datadir') / 'xsystem4"', language : 'c')
|
|
|
|
if get_option('buildtype').startswith('release')
|
|
add_project_arguments('-DRELEASE', language : 'c')
|
|
endif
|
|
|
|
static_libs = false
|
|
if host_machine.system() == 'windows'
|
|
static_libs = true
|
|
endif
|
|
|
|
zlib = dependency('zlib', static : static_libs)
|
|
libm = meson.get_compiler('c').find_library('m', required: false)
|
|
sdl2 = dependency('sdl2', static : static_libs)
|
|
ft2 = dependency('freetype2', static : static_libs)
|
|
ffi = dependency('libffi', static : static_libs)
|
|
tj = dependency('libturbojpeg', static : static_libs)
|
|
webp = dependency('libwebp', static : static_libs)
|
|
png = dependency('libpng', static : static_libs)
|
|
cglm = dependency('cglm', version : '>=0.9.2', fallback : ['cglm', 'cglm_dep'])
|
|
sndfile = dependency('sndfile', static : static_libs)
|
|
|
|
avcodec = dependency('libavcodec', version : '>=59.37.100', required: false, static : static_libs)
|
|
avformat = dependency('libavformat', required: false, static : static_libs)
|
|
avutil = dependency('libavutil', version : '>=57.28.100', required: false, static : static_libs)
|
|
swscale = dependency('libswscale', required: false, static : static_libs)
|
|
|
|
gles = dependency('glesv2', version : '>=3', required: get_option('opengles'))
|
|
if gles.found()
|
|
gl_deps = [gles]
|
|
add_project_arguments('-DUSE_GLES', language : 'c')
|
|
else
|
|
gl = dependency('GL')
|
|
glew = dependency('glew')
|
|
gl_deps = [gl, glew]
|
|
endif
|
|
|
|
chibi = dependency('chibi-scheme', required : false, static : static_libs)
|
|
readline = dependency('readline', required : false, static : static_libs)
|
|
|
|
flex = find_program('flex')
|
|
bison = find_program('bison')
|
|
|
|
incdir = include_directories('include')
|
|
|
|
libsys4_proj = subproject('libsys4')
|
|
libsys4_dep = libsys4_proj.get_variable('libsys4_dep')
|
|
|
|
subdir('src')
|
|
|
|
install_subdir('shaders', install_dir : get_option('datadir') / 'xsystem4')
|
|
install_subdir('fonts', install_dir : get_option('datadir') / 'xsystem4')
|
|
install_data('debugger.scm', install_dir : get_option('datadir') / 'xsystem4')
|