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 = [
'-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' )
dependencies = [ fmt , fuc2 , sol2 , glfw3 , glm , freetype2 ]
sources = [
'src/glad/glad.cpp' ,
'src/stb_image.cpp' ,
'src/shader.cpp' ,
'src/text.cpp' ,
'src/stats.cpp' ,
'src/dbc.cpp' ,
'src/builder.cpp' ,
'src/bezos.cpp' ,
'src/document.cpp' ,
'src/framebuffer.cpp' ,
'src/screen.cpp' ,
]
tests = [
'tests/main.cpp' ,
'tests/sol2_test.cpp' ,
'tests/builder_test.cpp' ,
]
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 )