Author: loonycyborg
Date: Sun Apr 6 15:40:25 2008
New Revision: 25626
URL: http://svn.gna.org/viewcvs/wesnoth?rev=25626&view=rev
Log:
Added boostdir, boostlibdir and boost_suffix options to scons recipe to specify
custom boost installation.
Modified:
trunk/SConstruct
Modified: trunk/SConstruct
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=25626&r1=25625&r2=25626&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Sun Apr 6 15:40:25 2008
@@ -52,6 +52,9 @@
opts.Add(BoolOption('strict', 'Set to strict compilation', False))
opts.Add(BoolOption('tinygui', 'Set for GUI reductions for resolutions down to
320x240 (PDAs), resize images before installing', False))
opts.Add(BoolOption('verbose', 'Emit progress messages during data
installation.', False))
+opts.Add(PathOption('boostdir', 'Directory of boost installation.',
'/usr/include'))
+opts.Add(PathOption('boostlibdir', 'Directory where boost libraries are
installed.', '/usr/lib'))
+opts.Add('boost_suffix', 'Suffix of boost libraries.')
#
# Setup
@@ -146,14 +149,14 @@
def CheckBoostLib(context, boost_lib, require_version = None):
env = context.env
- boostdir = env.get("BOOSTDIR", "/usr/include")
- boostlibdir = env.get("BOOSTLIBDIR", "/usr/lib")
+ boostdir = env.get("boostdir", "/usr/include")
+ boostlibdir = env.get("boostlibdir", "/usr/lib")
backup = backup_env(env, ["CPPPATH", "LIBPATH", "LIBS"])
boost_headers = { "regex" : "regex/config.hpp",
"iostreams" : "iostreams/constants.hpp" }
header_name = boost_headers.get(boost_lib, boost_lib + ".hpp")
- libname = "boost_" + boost_lib + env.get("BOOST_SUFFIX", "")
+ libname = "boost_" + boost_lib + env.get("boost_suffix", "")
env.AppendUnique(CPPPATH = [boostdir], LIBPATH = [boostlibdir])
env.AppendUnique(LIBS = [libname])
@@ -190,8 +193,8 @@
else:
context.Message("Checking for Boost %s library... " % boost_lib)
check_result = CheckBoostLib(context, boost_lib, require_version)
- if not check_result and not context.env.get("BOOST_SUFFIX"):
- context.env["BOOST_SUFFIX"] = "-mt"
+ if not check_result and not context.env.get("boost_suffix"):
+ context.env["boost_suffix"] = "-mt"
check_result = CheckBoostLib(context, boost_lib, require_version)
if check_result:
context.Result("yes")
@@ -456,9 +459,9 @@
# Platform-specific support, straight from configure.ac
if env["PLATFORM"] == 'win32': # Microsoft Windows
- env.Append("unicows") # Windows Unicode lib
+ env.Append(LIBS = "unicows") # Windows Unicode lib
elif env["PLATFORM"] == 'darwin': # Mac OS X
- env.Append("-framework Carbon") # Carbon GUI
+ env.Append(FRAMEWORKS = "Carbon") # Carbon GUI
#color_range.cpp should be removed, but game_config depends on it.
#game_config has very few things that are needed elsewhere, it should be
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits