project ( 'sol2_test' , 'cpp' ,
version : '0.1.0' ,
default_options : [
'cpp_std=c++23' ,
# 'cpp_args=-D_GLIBCXX_DEBUG=1 -D_GLIBCXX_DEBUG_PEDANTIC=1',
] )
# use this for common options only for our executables
cpp_args = [
'-I../subprojects/utf8cpp-4.0.9/source' ,
'-Wno-unused-parameter' ,
'-Wno-unused-function' ,
'-Wno-unused-variable' ,
'-Wno-unused-but-set-variable' ,
'-Wno-deprecated-declarations' ,
'-Wno-maybe-uninitialized' , # only because of error in release_build
]
link_args = [ ]
# these are passed as override_defaults
exe_defaults = [ 'warning_level=2' , 'werror=false' ]
fmt = subproject ( 'fmt' ) . get_variable ( 'fmt_dep' )
fuc2 = subproject ( 'fuc2' ) . get_variable ( 'fuc2_dep' )
sol2 = subproject ( 'sol2' ) . get_variable ( 'sol2_dep' )
glfw3 = subproject ( 'glfw' ) . get_variable ( 'glfw_dep' )
glm = subproject ( 'glm' ) . get_variable ( 'glm_dep' )
freetype2 = subproject ( 'freetype2' ) . get_variable ( 'freetype_dep' )
miniaudio = subproject ( 'miniaudio' ) . get_variable ( 'ma_dep' )
utf8cpp = subproject ( 'utf8cpp' ) . get_variable ( 'utf8cpp_dep' )
# have to disable tests because this dude's using catch2 from the 1890s
magic_enum_proj = subproject ( 'magic_enum' , default_options : {
'test' : false } )
magic_enum = magic_enum_proj . get_variable ( 'magic_enum_dep' )
dependencies = [
fmt , fuc2 , sol2 ,
glfw3 , glm , freetype2 ,
magic_enum , miniaudio
]
subdir ( 'src' )
subdir ( 'tests' )
executable ( 'bezos_tests' , sources + tests ,
cpp_args : cpp_args ,
link_args : link_args ,
include_directories : include_directories ( 'src' ) ,
override_options : exe_defaults ,
dependencies : dependencies )
executable ( 'bezos' , sources + [ 'src/main.cpp' ] ,
cpp_args : cpp_args ,
link_args : link_args ,
include_directories : include_directories ( 'src' ) ,
override_options : exe_defaults ,
dependencies : dependencies )