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')
|
||||
lel_guecs = subproject('lel-guecs').get_variable('lel_guecs_dep')
|
||||
|
||||
inc_dirs = include_directories('src')
|
||||
|
||||
subdir('src')
|
||||
subdir('tests')
|
||||
|
||||
dependencies += [
|
||||
fmt, json, freetype2,
|
||||
flac, ogg, vorbis, vorbisfile, vorbisenc,
|
||||
|
|
@ -84,10 +89,18 @@ dependencies += [
|
|||
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')
|
||||
subdir('tests')
|
||||
caster_dep = declare_dependency(
|
||||
link_with: caster_lib,
|
||||
include_directories: inc_dirs)
|
||||
|
||||
dependencies += [ caster_dep ]
|
||||
|
||||
executable('runtests', sources + tests,
|
||||
cpp_args: cpp_args,
|
||||
|
|
@ -97,7 +110,7 @@ executable('runtests', sources + tests,
|
|||
dependencies: dependencies + [catch2])
|
||||
|
||||
executable('zedcaster',
|
||||
sources + [ 'src/main.cpp' ],
|
||||
[ 'src/main.cpp' ],
|
||||
cpp_args: cpp_args,
|
||||
link_args: link_args,
|
||||
include_directories: inc_dirs,
|
||||
|
|
@ -105,7 +118,7 @@ executable('zedcaster',
|
|||
dependencies: dependencies)
|
||||
|
||||
executable('arena',
|
||||
arena_sources + [ 'tools/arena.cpp' ],
|
||||
[ 'tools/arena.cpp' ],
|
||||
cpp_args: cpp_args,
|
||||
link_args: link_args,
|
||||
include_directories: inc_dirs,
|
||||
|
|
@ -113,7 +126,7 @@ executable('arena',
|
|||
dependencies: dependencies)
|
||||
|
||||
executable('animator',
|
||||
sources + [ 'tools/animator.cpp' ],
|
||||
[ 'tools/animator.cpp' ],
|
||||
cpp_args: cpp_args,
|
||||
link_args: link_args,
|
||||
include_directories: inc_dirs,
|
||||
|
|
@ -121,7 +134,7 @@ executable('animator',
|
|||
dependencies: dependencies)
|
||||
|
||||
executable('storyboard',
|
||||
sources + [ 'tools/storyboard.cpp' ],
|
||||
[ 'tools/storyboard.cpp' ],
|
||||
cpp_args: cpp_args,
|
||||
link_args: link_args,
|
||||
include_directories: inc_dirs,
|
||||
|
|
@ -129,7 +142,7 @@ executable('storyboard',
|
|||
dependencies: dependencies)
|
||||
|
||||
executable('icongen',
|
||||
sources + [ 'tools/icongen.cpp' ],
|
||||
[ 'tools/icongen.cpp' ],
|
||||
cpp_args: cpp_args,
|
||||
link_args: link_args,
|
||||
include_directories: inc_dirs,
|
||||
|
|
@ -137,7 +150,7 @@ executable('icongen',
|
|||
dependencies: dependencies)
|
||||
|
||||
executable('fragviewer',
|
||||
sources + [ 'tools/fragviewer.cpp' ],
|
||||
[ 'tools/fragviewer.cpp' ],
|
||||
cpp_args: cpp_args,
|
||||
link_args: link_args,
|
||||
include_directories: inc_dirs,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue