Split engine support into a separate internal lib
The chess engine support currently lives in src/, which otherwise handles only GUI functions. This is a little misplaced, because engines are not related to the GUI. So lib/ would be a better location for it. Except all the engine support is actually higher-level than lib/. So we can nicely fit it in between src/ and lib/ by creating a second internal lib, libengine. This is only a small benefit, but it's nice to keep src/ focused on the GUI.
This commit is contained in:
parent
64ba3d3b67
commit
6ce6d59c4a
7 changed files with 35 additions and 4 deletions
33
engine/meson.build
Normal file
33
engine/meson.build
Normal file
|
@ -0,0 +1,33 @@
|
|||
libengine_sources = [
|
||||
'ai-profile.vala',
|
||||
'chess-engine-cecp.vala',
|
||||
'chess-engine-uci.vala',
|
||||
'chess-engine.vala',
|
||||
]
|
||||
|
||||
libengine_vala_args = [
|
||||
'--target-glib=@0@'.format(min_glib_version),
|
||||
]
|
||||
|
||||
libengine_c_args = [
|
||||
'-include', 'config.h',
|
||||
]
|
||||
|
||||
libengine_deps = [
|
||||
glib,
|
||||
gio,
|
||||
posix,
|
||||
libchess_dep,
|
||||
]
|
||||
|
||||
libengine = static_library('libengine', libengine_sources,
|
||||
include_directories: config_h_dir,
|
||||
vala_args: libengine_vala_args,
|
||||
c_args: libengine_c_args,
|
||||
dependencies: libengine_deps
|
||||
)
|
||||
|
||||
libengine_dep = declare_dependency(
|
||||
link_with: libengine,
|
||||
include_directories: include_directories('.'),
|
||||
)
|
|
@ -57,6 +57,7 @@ meson.add_install_script('meson_post_install.py')
|
|||
subdir('data')
|
||||
subdir('po')
|
||||
subdir('lib')
|
||||
subdir('engine')
|
||||
subdir('src')
|
||||
subdir('tests')
|
||||
subdir('help')
|
||||
|
|
|
@ -8,10 +8,6 @@ resources = gnome.compile_resources(application_id, resource_files,
|
|||
# The gnome-chess binary
|
||||
chess_sources = [
|
||||
resources,
|
||||
'ai-profile.vala',
|
||||
'chess-engine-cecp.vala',
|
||||
'chess-engine-uci.vala',
|
||||
'chess-engine.vala',
|
||||
'chess-scene.vala',
|
||||
'chess-view.vala',
|
||||
'gnome-chess.vala',
|
||||
|
@ -32,6 +28,7 @@ chess_deps = [
|
|||
librsvg,
|
||||
posix,
|
||||
libchess_dep,
|
||||
libengine_dep,
|
||||
]
|
||||
|
||||
executable('gnome-chess', chess_sources,
|
||||
|
|
Loading…
Reference in a new issue