rtengine/meson.build
Kevin Trogant 1dba3d2d63 fix, feat: various issues
- [win32] FIO thread no longer hangs during application exit
- Signal if a file operation was actually successfull.
- Add a logging function (currently identical to vyReportError)
2023-10-13 23:15:23 +02:00

57 lines
1.5 KiB
Meson

project('voyage', 'c',
default_options: ['buildtype=debugoptimized', 'b_sanitize=address', 'c_std=c17', 'warning_level=3'])
compiler = meson.get_compiler('c')
buildtype = get_option('buildtype')
# Build options
if compiler.get_argument_syntax() == 'gcc'
add_project_arguments(
['-Wconversion', '-Wno-sign-conversion',
'-Wdouble-promotion', '-Wno-unused-function', '-Wno-unused-parameter'],
language : 'c'
)
elif compiler.get_argument_syntax() == 'msvc'
add_project_arguments(
['/wd4146', '/wd4245', '/wd4100', '/D_CRT_SECURE_NO_WARNINGS', '/RTCsu'],
language: 'c'
)
endif
# Debug specific flags
if buildtype == 'debug'
add_project_arguments([ '-DDEBUG'], language : 'c')
endif
# "Select" renderer backend
# Currently only OpenGL is supported
add_project_arguments([ '-DRENDERER_GL'], language : 'c')
# Gather dependencies
thread_dep = dependency('threads')
m_dep = compiler.find_library('m', required : false)
glfw_proj = subproject('glfw', default_options : 'default_library=static')
glfw_dep = glfw_proj.get_variable('glfw_dep')
incdir = include_directories(['contrib', 'include'])
executable('voyage',
# Project Sources
'include/voyage.h',
'include/gfx.h',
'include/gfx_backend.h',
'include/fio.h',
'src/voyage.c',
'src/fio.c',
'src/error_report.c',
'src/gfx_main.c',
'src/gfx_shader_loading.c',
'src/gfx_pipelines.c',
# Contrib Sources
'contrib/glad/glad.c',
'contrib/xxhash/xxhash.c',
dependencies : [thread_dep, m_dep, glfw_dep],
include_directories: incdir)