46 lines
1.2 KiB
Meson
46 lines
1.2 KiB
Meson
project('chainreact', 'cpp',
|
|
version : '0.1pre',
|
|
default_options : [
|
|
'b_lundef=false',
|
|
'b_sanitize=address,undefined',
|
|
'warning_level=3',
|
|
'cpp_std=c++20',
|
|
'd_ndebug=if-release',
|
|
'optimization=g'
|
|
],
|
|
license: 'EUPL-1.2')
|
|
|
|
add_project_arguments('-pedantic', language: 'cpp')
|
|
|
|
compiler = meson.get_compiler('cpp').get_id()
|
|
if compiler == 'clang++'
|
|
add_project_arguments('-fcoroutines-ts', language: 'cpp')
|
|
elif compiler == 'g++'
|
|
add_project_arguments('-fcoroutines', language: 'cpp')
|
|
endif
|
|
|
|
executable('chainreact-sdl',
|
|
'src/core/ai.cpp',
|
|
'src/core/board2d.cpp',
|
|
'src/sdlui/board_widget_impl.cpp',
|
|
'src/sdlui/game_screen_impl.cpp',
|
|
'src/sdlui/sdlui.cpp',
|
|
dependencies : [
|
|
dependency('basic_widgets',
|
|
static : true,
|
|
),
|
|
],
|
|
install : true)
|
|
|
|
executable('chainreact-cli',
|
|
'src/core/board2d.cpp',
|
|
'src/tui/tui.cpp',
|
|
'src/tui/main.cpp',
|
|
dependencies : [
|
|
dependency('basic_widgets',
|
|
static : true,
|
|
),
|
|
],
|
|
install : true,
|
|
win_subsystem : 'windows')
|