From 1cccff025d47d9b76b6f8a38c3544170add09425 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Mon, 10 May 2021 20:31:57 +0300 Subject: [PATCH 50/50] Meson: Set GDK_VERSION_MIN_REQUIRED & co per-target Having them as global flags won't work when we have executables for multiple different gtk versions. See osdn #42216 Signed-off-by: Marko Lindqvist --- meson.build | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 95b1bdbd55..0f37f910cb 100644 --- a/meson.build +++ b/meson.build @@ -6,8 +6,6 @@ if not get_option('ack_experimental') endif add_global_arguments('-Wno-nonnull-compare', language : 'c') -add_global_arguments('-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_20', language : 'c') -add_global_arguments('-DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_22', language : 'c') add_global_arguments('-fPIC', language : 'cpp') add_global_arguments('-DQT_DISABLE_DEPRECATED_BEFORE=0x050b00', language : 'cpp') @@ -2163,6 +2161,8 @@ executable('freeciv-gtk3.22', 'client/gui-gtk-3.22/unitselunitdlg.c', 'client/gui-gtk-3.22/voteinfo_bar.c', 'client/gui-gtk-3.22/wldlg.c', + c_args: [ '-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_20', + '-DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_22'], include_directories: client_inc, dependencies: [gtk322_dep, ws2_dep], link_with: client_common, @@ -2534,6 +2534,8 @@ endif executable('freeciv-mp-gtk3', 'tools/fcmp/mpgui_gtk3.c', + c_args: [ '-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_20', + '-DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_22'], include_directories: tool_inc, dependencies: [gtk322_dep, c_compiler.find_library('libsqlite3', dirs: cross_lib_path)], -- 2.30.2