From 8133db08f16813990891f026585edb0c55eae5ce Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Tue, 11 Oct 2022 02:38:46 +0300 Subject: [PATCH 51/51] Meson: Add stub-client support See osdn #45821 Signed-off-by: Marko Lindqvist --- doc/INSTALL.meson | 2 +- meson.build | 47 ++++++++++++++++++++++++++++++++++++++++++++++- meson_options.txt | 2 +- 3 files changed, 48 insertions(+), 3 deletions(-) diff --git a/doc/INSTALL.meson b/doc/INSTALL.meson index 2c88876cee..4b41baa38b 100644 --- a/doc/INSTALL.meson +++ b/doc/INSTALL.meson @@ -100,7 +100,7 @@ Freeciv specific configure options: clients (array): List of clients to build. To disable client build completely, give an empty array ('-Dclients=[]'). Currently gtk3.22-, sdl2-, qt-, - and gtk4-client builds are supported. + gtk4-, and stub-client builds are supported. By default builds just gtk3.22-client. fcmp (array): diff --git a/meson.build b/meson.build index 75b0bca815..a87ff53f49 100644 --- a/meson.build +++ b/meson.build @@ -2763,6 +2763,7 @@ mocced_client = qt_mod.preprocess( ) executable('freeciv-qt', + 'client/gui_interface.c', 'client/gui-qt/canvas.cpp', 'client/gui-qt/chatline.cpp', 'client/gui-qt/citydlg.cpp', @@ -2800,7 +2801,6 @@ executable('freeciv-qt', 'client/gui-qt/themes.cpp', 'client/gui-qt/voteinfo_bar.cpp', 'client/gui-qt/wldlg.cpp', - 'client/gui_interface.c', mocced_client, clienticon, include_directories: [client_inc, include_directories('client/gui-qt')], dependencies: [qt_dep, net_dep, gettext_dep], @@ -3062,6 +3062,51 @@ install_data('data/themes/gui-sdl2/human/backgrounds.themespec', endif +if get_option('clients').contains('stub') + +executable('freeciv-stub', + 'client/gui_cbsetter.c', + 'client/gui_interface.c', + 'client/gui-stub/canvas.c', + 'client/gui-stub/chatline.c', + 'client/gui-stub/citydlg.c', + 'client/gui-stub/cityrep.c', + 'client/gui-stub/colors.c', + 'client/gui-stub/connectdlg.c', + 'client/gui-stub/dialogs.c', + 'client/gui-stub/diplodlg.c', + 'client/gui-stub/finddlg.c', + 'client/gui-stub/gotodlg.c', + 'client/gui-stub/graphics.c', + 'client/gui-stub/gui_main.c', + 'client/gui-stub/helpdlg.c', + 'client/gui-stub/infradlg.c', + 'client/gui-stub/inteldlg.c', + 'client/gui-stub/luaconsole.c', + 'client/gui-stub/mapctrl.c', + 'client/gui-stub/mapview.c', + 'client/gui-stub/menu.c', + 'client/gui-stub/messagedlg.c', + 'client/gui-stub/messagewin.c', + 'client/gui-stub/optiondlg.c', + 'client/gui-stub/pages.c', + 'client/gui-stub/plrdlg.c', + 'client/gui-stub/ratesdlg.c', + 'client/gui-stub/repodlgs.c', + 'client/gui-stub/spaceshipdlg.c', + 'client/gui-stub/sprite.c', + 'client/gui-stub/themes.c', + 'client/gui-stub/voteinfo_bar.c', + 'client/gui-stub/wldlg.c', + clienticon, + include_directories: client_inc, + dependencies: [audio_dep, net_dep, gettext_dep], + link_with: client_common, + install: true + ) + +endif + if get_option('fcmp') != [] fcmp_common = static_library('fcmp_common', diff --git a/meson_options.txt b/meson_options.txt index c0b5e0a3b7..04e98d0259 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,6 +1,6 @@ option('clients', type: 'array', - choices: ['gtk3.22','sdl2', 'qt', 'gtk4'], + choices: ['gtk3.22','sdl2', 'qt', 'gtk4', 'stub'], value: ['gtk3.22'], description: 'Clients to build') -- 2.35.1