project( 'jujube', ['cpp', 'c'], version : '0.1.0', default_options : ['cpp_std=c++20'], ) sources = [] subdir('include') # Defines `inc` and adds stuff in `sources` subdir('src') # Adds stuff in the `sources` list and defines configuration_inc cc = meson.get_compiler('cpp') dependencies = [ dependency('sfml-system', version : '>=2.5.1'), dependency('sfml-window', version : '>=2.5.1'), dependency('sfml-graphics', version : '>=2.5.1'), dependency('sfml-audio', version : '>=2.5.1'), dependency('threads'), dependency('gl'), cc.find_library('atomic'), dependency('nowide'), dependency('nlohmann_json') ] if host_machine.system() == 'linux' dependencies += [ cc.find_library('m'), cc.find_library('X11'), cc.find_library('dw') ] sources += ['include/backward-cpp/backward.cpp'] add_project_arguments('-DBACKWARD_HAS_DW=1', language : 'cpp') add_project_link_arguments('-lstdc++', language : 'cpp') endif inc = include_directories('include', 'include/imgui', 'include/imgui-sfml') subdir('test') executable( 'jujube', sources: sources, dependencies: dependencies, include_directories : inc, cpp_args : [ '-Wall', '-Wextra', '-Wshadow', '-Wnon-virtual-dtor', '-pedantic' ], win_subsystem: 'windows' # mark as GUI app when compiling for windows, hides the console amongst other things )