project('voyage', 'c', default_options: ['buildtype=debug', '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') glfw_dep = glfw_proj.get_variable('glfw_dep') incdir = include_directories(['contrib', 'include']) executable('voyage', # Project Sources '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)