Feature #1816 » 0043-Meson-Add-aimodules-option.patch
| INSTALL | ||
|---|---|---|
|
means that freeciv-web version will be built instead of
|
||
|
the regular server.
|
||
|
aimodules (array):
|
||
|
AI modules to build in to the server. At least one needed.
|
||
|
Has no effect if the server is not built.
|
||
|
* classic
|
||
|
* tex
|
||
|
* stub
|
||
|
Default is to build classic and tex.
|
||
|
appimage (boolean):
|
||
|
Make build suitable for AppImage packaging. This affects paths from
|
||
|
which various resources are looked from, and produces build that
|
||
| meson.build | ||
|---|---|---|
|
priv_conf_data.set('AI_MOD_STATIC_STUB', 1)
|
||
|
else
|
||
|
pub_conf_data.set('FREECIV_AI_MOD_LAST', 2)
|
||
|
aimodcount = 0
|
||
|
aisrc = []
|
||
|
priv_conf_data.set('AI_MOD_STATIC_CLASSIC', 1)
|
||
|
priv_conf_data.set('AI_MOD_STATIC_TEX', 1)
|
||
|
if get_option('aimodules').contains('classic')
|
||
|
priv_conf_data.set('AI_MOD_STATIC_CLASSIC', 1)
|
||
|
aimodcount = aimodcount + 1
|
||
|
aisrc = [ aisrc, 'ai/classic/classicai.c' ]
|
||
|
endif
|
||
|
if get_option('aimodules').contains('tex')
|
||
|
priv_conf_data.set('AI_MOD_STATIC_TEX', 1)
|
||
|
aimodcount = aimodcount + 1
|
||
|
aisrc = [ aisrc,
|
||
|
'ai/tex/texai.c',
|
||
|
'ai/tex/texaicity.c',
|
||
|
'ai/tex/texaimsg.c',
|
||
|
'ai/tex/texaiplayer.c',
|
||
|
'ai/tex/texaiworld.c' ]
|
||
|
endif
|
||
|
if get_option('aimodules').contains('stub')
|
||
|
priv_conf_data.set('AI_MOD_STATIC_STUB', 1)
|
||
|
aimodcount = aimodcount + 1
|
||
|
aisrc = [ aisrc, 'ai/stub/stubai.c' ]
|
||
|
endif
|
||
|
if aimodcount == 0
|
||
|
error('No AI modules enabled, but at least one needed')
|
||
|
endif
|
||
|
pub_conf_data.set('FREECIV_AI_MOD_LAST', aimodcount)
|
||
|
endif
|
||
|
if meson.is_cross_build()
|
||
| ... | ... | |
|
else
|
||
|
ais = static_library('fc_ai',
|
||
|
'ai/classic/classicai.c',
|
||
|
'ai/tex/texai.c',
|
||
|
'ai/tex/texaicity.c',
|
||
|
'ai/tex/texaimsg.c',
|
||
|
'ai/tex/texaiplayer.c',
|
||
|
'ai/tex/texaiworld.c',
|
||
|
aisrc,
|
||
|
'ai/default/daiair.c',
|
||
|
'ai/default/daiactions.c',
|
||
|
'ai/default/daicity.c',
|
||
| meson_options.txt | ||
|---|---|---|
|
value: 'enabled',
|
||
|
description: 'What kind of server should be build, if any')
|
||
|
option('aimodules',
|
||
|
type: 'array',
|
||
|
choices: ['classic', 'tex', 'stub'],
|
||
|
value: ['classic', 'tex'],
|
||
|
description: 'AI modules to include to the server')
|
||
|
option('appimage',
|
||
|
type: 'boolean',
|
||
|
value: false,
|
||