From 3a4c11a2e73e8a2cabd6a327ee536b17c6cd9b3a Mon Sep 17 00:00:00 2001 From: "Ignacio R. Morelle" Date: Mon, 13 Jul 2015 05:09:39 -0300 Subject: [PATCH] scons: Propagate HAVE_FRIBIDI to all files How does doing otherwise even help reduce compile times unless you are changing your build environment every time? It's just a liability that makes it harder to do feature detection from other files. It's also asymmetrical with regards to the CMake recipe. --- SConstruct | 3 ++- src/SConscript | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/SConstruct b/SConstruct index 55be85d3f925..62f16a64512d 100755 --- a/SConstruct +++ b/SConstruct @@ -418,8 +418,9 @@ if env["prereqs"]: if env["notifications"]: client_env.Append(CPPDEFINES = ["HAVE_LIBDBUS"]) + client_env['fribidi'] = client_env['fribidi'] and (conf.CheckPKG('fribidi >= 0.10.9') or Warning("Can't find libfribidi, disabling freebidi support.")) if client_env['fribidi']: - client_env['fribidi'] = conf.CheckPKG('fribidi >= 0.10.9') or Warning("Can't find libfribidi, disabling freebidi support.") + client_env.Append(CPPDEFINES = ["HAVE_FRIBIDI"]) env["png"] = env["png"] and conf.CheckLib("png") if env["png"]: diff --git a/src/SConscript b/src/SConscript index 302be5a16931..4223f84c9a9d 100644 --- a/src/SConscript +++ b/src/SConscript @@ -89,6 +89,7 @@ libwesnoth_sources = Split(""" display_context.cpp events.cpp floating_label.cpp + font.cpp format_time_summary.cpp generic_event.cpp hotkey/hotkey_item.cpp @@ -144,9 +145,6 @@ libwesnoth_sources = Split(""" widgets/widget.cpp wml_exception.cpp """) -libwesnoth_sources.extend([ - client_env.Object("font.cpp", EXTRA_DEFINE = client_env['fribidi'] and "HAVE_FRIBIDI" or None), - ]) libwesnoth = client_env.Library("wesnoth", libwesnoth_sources)