Skip to content

Commit

Permalink
scons: Propagate HAVE_FRIBIDI to all files
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
irydacea committed Jul 13, 2015
1 parent 29d4da6 commit 3a4c11a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion SConstruct
Expand Up @@ -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"]:
Expand Down
4 changes: 1 addition & 3 deletions src/SConscript
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 3a4c11a

Please sign in to comment.