By compiling the code into a .a file I can avoid meson's weird duplication of compiled .o files, cutting build times in half on average.
This commit is contained in:
parent
f0b04107ab
commit
13d1f54f09
2 changed files with 22 additions and 63 deletions
31
meson.build
31
meson.build
|
|
@ -76,6 +76,11 @@ sfml_system = subproject('sfml').get_variable('sfml_system_dep')
|
||||||
sfml_window = subproject('sfml').get_variable('sfml_window_dep')
|
sfml_window = subproject('sfml').get_variable('sfml_window_dep')
|
||||||
lel_guecs = subproject('lel-guecs').get_variable('lel_guecs_dep')
|
lel_guecs = subproject('lel-guecs').get_variable('lel_guecs_dep')
|
||||||
|
|
||||||
|
inc_dirs = include_directories('src')
|
||||||
|
|
||||||
|
subdir('src')
|
||||||
|
subdir('tests')
|
||||||
|
|
||||||
dependencies += [
|
dependencies += [
|
||||||
fmt, json, freetype2,
|
fmt, json, freetype2,
|
||||||
flac, ogg, vorbis, vorbisfile, vorbisenc,
|
flac, ogg, vorbis, vorbisfile, vorbisenc,
|
||||||
|
|
@ -84,10 +89,18 @@ dependencies += [
|
||||||
sfml_window, lel_guecs
|
sfml_window, lel_guecs
|
||||||
]
|
]
|
||||||
|
|
||||||
inc_dirs = include_directories('src')
|
caster_lib = static_library('caster',
|
||||||
|
sources,
|
||||||
|
cpp_args: cpp_args,
|
||||||
|
include_directories: inc_dirs,
|
||||||
|
override_options: exe_defaults,
|
||||||
|
dependencies: dependencies)
|
||||||
|
|
||||||
subdir('src')
|
caster_dep = declare_dependency(
|
||||||
subdir('tests')
|
link_with: caster_lib,
|
||||||
|
include_directories: inc_dirs)
|
||||||
|
|
||||||
|
dependencies += [ caster_dep ]
|
||||||
|
|
||||||
executable('runtests', sources + tests,
|
executable('runtests', sources + tests,
|
||||||
cpp_args: cpp_args,
|
cpp_args: cpp_args,
|
||||||
|
|
@ -97,7 +110,7 @@ executable('runtests', sources + tests,
|
||||||
dependencies: dependencies + [catch2])
|
dependencies: dependencies + [catch2])
|
||||||
|
|
||||||
executable('zedcaster',
|
executable('zedcaster',
|
||||||
sources + [ 'src/main.cpp' ],
|
[ 'src/main.cpp' ],
|
||||||
cpp_args: cpp_args,
|
cpp_args: cpp_args,
|
||||||
link_args: link_args,
|
link_args: link_args,
|
||||||
include_directories: inc_dirs,
|
include_directories: inc_dirs,
|
||||||
|
|
@ -105,7 +118,7 @@ executable('zedcaster',
|
||||||
dependencies: dependencies)
|
dependencies: dependencies)
|
||||||
|
|
||||||
executable('arena',
|
executable('arena',
|
||||||
arena_sources + [ 'tools/arena.cpp' ],
|
[ 'tools/arena.cpp' ],
|
||||||
cpp_args: cpp_args,
|
cpp_args: cpp_args,
|
||||||
link_args: link_args,
|
link_args: link_args,
|
||||||
include_directories: inc_dirs,
|
include_directories: inc_dirs,
|
||||||
|
|
@ -113,7 +126,7 @@ executable('arena',
|
||||||
dependencies: dependencies)
|
dependencies: dependencies)
|
||||||
|
|
||||||
executable('animator',
|
executable('animator',
|
||||||
sources + [ 'tools/animator.cpp' ],
|
[ 'tools/animator.cpp' ],
|
||||||
cpp_args: cpp_args,
|
cpp_args: cpp_args,
|
||||||
link_args: link_args,
|
link_args: link_args,
|
||||||
include_directories: inc_dirs,
|
include_directories: inc_dirs,
|
||||||
|
|
@ -121,7 +134,7 @@ executable('animator',
|
||||||
dependencies: dependencies)
|
dependencies: dependencies)
|
||||||
|
|
||||||
executable('storyboard',
|
executable('storyboard',
|
||||||
sources + [ 'tools/storyboard.cpp' ],
|
[ 'tools/storyboard.cpp' ],
|
||||||
cpp_args: cpp_args,
|
cpp_args: cpp_args,
|
||||||
link_args: link_args,
|
link_args: link_args,
|
||||||
include_directories: inc_dirs,
|
include_directories: inc_dirs,
|
||||||
|
|
@ -129,7 +142,7 @@ executable('storyboard',
|
||||||
dependencies: dependencies)
|
dependencies: dependencies)
|
||||||
|
|
||||||
executable('icongen',
|
executable('icongen',
|
||||||
sources + [ 'tools/icongen.cpp' ],
|
[ 'tools/icongen.cpp' ],
|
||||||
cpp_args: cpp_args,
|
cpp_args: cpp_args,
|
||||||
link_args: link_args,
|
link_args: link_args,
|
||||||
include_directories: inc_dirs,
|
include_directories: inc_dirs,
|
||||||
|
|
@ -137,7 +150,7 @@ executable('icongen',
|
||||||
dependencies: dependencies)
|
dependencies: dependencies)
|
||||||
|
|
||||||
executable('fragviewer',
|
executable('fragviewer',
|
||||||
sources + [ 'tools/fragviewer.cpp' ],
|
[ 'tools/fragviewer.cpp' ],
|
||||||
cpp_args: cpp_args,
|
cpp_args: cpp_args,
|
||||||
link_args: link_args,
|
link_args: link_args,
|
||||||
include_directories: inc_dirs,
|
include_directories: inc_dirs,
|
||||||
|
|
|
||||||
|
|
@ -66,57 +66,3 @@ sources = files(
|
||||||
# root
|
# root
|
||||||
'dbc.cpp',
|
'dbc.cpp',
|
||||||
)
|
)
|
||||||
|
|
||||||
arena_sources = files(
|
|
||||||
# ai
|
|
||||||
'ai/ai.cpp',
|
|
||||||
'ai/ai_debug.cpp',
|
|
||||||
'ai/goap.cpp',
|
|
||||||
|
|
||||||
# combat
|
|
||||||
'combat/battle.cpp',
|
|
||||||
'combat/combat.cpp',
|
|
||||||
|
|
||||||
# boss fight mini game
|
|
||||||
'boss/fight.cpp',
|
|
||||||
'boss/system.cpp',
|
|
||||||
'boss/ui.cpp',
|
|
||||||
|
|
||||||
# gui
|
|
||||||
'gui/backend.cpp',
|
|
||||||
'gui/combat_ui.cpp',
|
|
||||||
'gui/debug_ui.cpp',
|
|
||||||
'gui/event_router.cpp',
|
|
||||||
'gui/guecstra.cpp',
|
|
||||||
|
|
||||||
# graphics
|
|
||||||
'graphics/animation.cpp',
|
|
||||||
'graphics/camera.cpp',
|
|
||||||
'graphics/easing.cpp',
|
|
||||||
'graphics/palette.cpp',
|
|
||||||
'graphics/scene.cpp',
|
|
||||||
'graphics/shaders.cpp',
|
|
||||||
'graphics/textures.cpp',
|
|
||||||
'graphics/lights.cpp',
|
|
||||||
|
|
||||||
# algos
|
|
||||||
'algos/matrix.cpp',
|
|
||||||
'algos/maze.cpp',
|
|
||||||
'algos/spatialmap.cpp',
|
|
||||||
'algos/rand.cpp',
|
|
||||||
'algos/pathing.cpp',
|
|
||||||
|
|
||||||
# game
|
|
||||||
'game/worldbuilder.cpp',
|
|
||||||
'game/map.cpp',
|
|
||||||
'game/level.cpp',
|
|
||||||
'game/inventory.cpp',
|
|
||||||
'game/sound.cpp',
|
|
||||||
'game/systems.cpp',
|
|
||||||
'game/components.cpp',
|
|
||||||
'game/config.cpp',
|
|
||||||
'game/rituals.cpp',
|
|
||||||
|
|
||||||
# root
|
|
||||||
'dbc.cpp',
|
|
||||||
)
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue