From 214bf1f77333905286c321fdce8a4fedcb342917 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Thu, 11 May 2023 17:36:19 +0300 Subject: [PATCH 33/33] Meson: Add support to build gtk4x modpack installer See osdn #48017 Signed-off-by: Marko Lindqvist --- doc/INSTALL.meson | 2 +- doc/README.packaging | 2 ++ meson.build | 21 +++++++++++++++++++++ meson_options.txt | 2 +- 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/doc/INSTALL.meson b/doc/INSTALL.meson index 9fbe1e2b14..b498e73275 100644 --- a/doc/INSTALL.meson +++ b/doc/INSTALL.meson @@ -106,7 +106,7 @@ clients (array): fcmp (array): List of freeciv modpack installer UIs to build. To disable their build completely, give an empty array ('-Dfcmp=[]'). Currently gtk3, qt, gtk4, - and cli are supported. By default builds just gtk3 UI. + gtk4x, and cli are supported. By default builds just gtk3 UI. cacert-path (string): Custom path to CA cert bundle. If this is empty, default path will be used. diff --git a/doc/README.packaging b/doc/README.packaging index 74e8987171..7d1bed587f 100644 --- a/doc/README.packaging +++ b/doc/README.packaging @@ -24,6 +24,8 @@ Updating from 3.2 to 3.3 relatively new Qt6 versions * Build with meson supports building gtk4x-client that is linked against relatively new gtk4 versions +* Build with meson supports building gtk4x modpack installer that is linked + against relatively new gtk4 versions ---------------------------------------------------------------------- Compatibility of modified versions diff --git a/meson.build b/meson.build index ed4d35cbef..0e74328dd6 100644 --- a/meson.build +++ b/meson.build @@ -3621,6 +3621,27 @@ custom_target('mi_mp_gtk4', endif +if get_option('fcmp').contains('gtk4x') + +if not gtk5_dep.found() + error('gtk-4.0 >= 4.8 required for gtk4x modpack installer, but not found') +endif + +executable('freeciv-mp-gtk4x', + 'tools/fcmp/mpgui_gtk4.c', + mpicon, + c_args: [ '-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_4_8', + '-DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_4_8', + '-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_66', + '-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_66'], + include_directories: tool_inc, + dependencies: [gtk5_dep, sqlite3_dep, gettext_dep], + link_with: [common_lib, fcmp_common], + install: true + ) + +endif + if get_option('fcmp').contains('qt') if not qt_dep.found() diff --git a/meson_options.txt b/meson_options.txt index ca8c93967c..73a7e1ff53 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -6,7 +6,7 @@ option('clients', option('fcmp', type: 'array', - choices: ['gtk3','qt','cli','gtk4'], + choices: ['gtk3','qt','cli','gtk4', 'gtk4x'], value: ['gtk3'], description: 'Modpack installer UIs to build') -- 2.39.2