project('roguish', 'cpp', default_options: [ 'cpp_std=c++20', 'cpp_args=-D_GLIBCXX_DEBUG=1 -D_GLIBCXX_DEBUG_PEDANTIC=1', ]) # use this for common options only for our executables cpp_args=[] # these are passed as override_defaults exe_defaults = ['warning_level=2', 'werror=true'] cc = meson.get_compiler('cpp') catch2 = dependency('catch2-with-main') fmt = dependency('fmt', allow_fallback: true) json = dependency('nlohmann_json') ftxui_screen = dependency('ftxui-screen') ftxui_dom = dependency('ftxui-dom') ftxui_component = dependency('ftxui-component') thread_dep = dependency('threads') freetype2 = dependency('freetype2') opengl32 = cc.find_library('opengl32', required: true) winmm = cc.find_library('winmm', required: true) gdi32 = cc.find_library('gdi32', required: true) flac = dependency('flac') ogg = dependency('ogg') vorbis = dependency('vorbis') vorbisfile = dependency('vorbisfile') vorbisenc = dependency('vorbisenc') sfml_audio = dependency('sfml_audio') sfml_graphics = dependency('sfml_graphics') sfml_main = dependency('sfml_main') sfml_network = dependency('sfml_network') sfml_system = dependency('sfml_system') sfml_window = dependency('sfml_window') dependencies = [ ftxui_screen, ftxui_dom, ftxui_component, thread_dep, fmt, json, opengl32, freetype2, flac, ogg, vorbis, vorbisfile, vorbisenc, winmm, gdi32, sfml_audio, sfml_graphics, sfml_main, sfml_network, sfml_system, sfml_window ] source=[ 'dbc.cpp', 'matrix.cpp', 'tilemap.cpp', 'map.cpp', 'levelmanager.cpp', 'gui.cpp', 'rand.cpp', 'sound.cpp', 'spatialmap.cpp', 'combat.cpp', 'systems.cpp', 'ansi_parser.cpp', 'render.cpp', 'config.cpp', 'save.cpp', 'panel.cpp', 'pathing.cpp', 'lights.cpp', 'worldbuilder.cpp', 'inventory.cpp', 'devices.cpp', 'components.cpp', ] runtests = executable('runtests', source + [ 'tests/tilemap.cpp', 'tests/matrix.cpp', 'tests/fsm.cpp', 'tests/dbc.cpp', 'tests/map.cpp', 'tests/spatialmap.cpp', 'tests/components.cpp', 'tests/dinkyecs.cpp', 'tests/ansi_parser.cpp', 'tests/config.cpp', 'tests/save.cpp', 'tests/render.cpp', 'tests/panel.cpp', 'tests/sound.cpp', 'tests/pathing.cpp', 'tests/lighting.cpp', 'tests/levelmanager.cpp', 'tests/gui.cpp', 'tests/worldbuilder.cpp', 'tests/inventory.cpp', 'tests/matrix2.cpp', ], cpp_args: cpp_args, override_options: exe_defaults, dependencies: dependencies + [catch2]) roguish = executable('roguish', source + ['main.cpp'], cpp_args: cpp_args, override_options: exe_defaults, dependencies: dependencies) designer = executable('designer', [ 'matrix.cpp', 'dbc.cpp', 'rand.cpp', 'ansi_parser.cpp', 'render.cpp', 'config.cpp', 'panel.cpp', 'pathing.cpp', 'lights.cpp', 'tools/designer.cpp'], cpp_args: cpp_args, override_options: exe_defaults, dependencies: dependencies) fontextract = executable('fontextract', [ 'dbc.cpp', 'rand.cpp', 'config.cpp', 'tools/fontextract.cpp', ], cpp_args: cpp_args, override_options: exe_defaults, dependencies: dependencies) img2ansi = executable('img2ansi', [ 'dbc.cpp', 'panel.cpp', 'ansi_parser.cpp', 'render.cpp', 'scratchpad/img2ansi.cpp' ], cpp_args: cpp_args, override_options: exe_defaults, dependencies: dependencies) test('tests', runtests)