5 modules = ['thread','program_options']
7 target_os = env.get('TARGET_OS')
9 if 'linux' == target_os :
10 # Check for Boost libraries in /usr/boost
11 print 'TODO: Perform platform check for linux'
12 raise SCons.Errors.EnvironmentError('Unsupported platform')
14 if 'android' == target_os :
15 env.Tool('URLDownload', toolpath=['../../tools/scons'])
16 env.Tool('UnpackAll', toolpath=['../../tools/scons'])
17 env.Tool('BoostBootstrap', toolpath=['../../tools/scons'])
18 env.Tool('BoostBuild', toolpath=['../../tools/scons'])
20 boost_version = '1.57.0'
21 boost_base_name = 'boost_'+string.replace(boost_version,'.','_')
22 boost_arch_name = boost_base_name+'.zip'
23 boost_url = 'http://downloads.sourceforge.net/project/boost/boost/'+boost_version+'/'+boost_arch_name+'?r=&ts=1421801329&use_mirror=iweb'
25 host_os = sys.platform
27 if host_os == 'linux2' :
28 boost_bootstrap = boost_base_name+os.sep+'bootstrap.sh'
29 boost_b2_name = boost_base_name+os.sep+'b2'
31 msg="Host platform (%s) is currently not supported for boost builds" % host_os
32 raise SCons.Errors.EnvironmentError(msg)
34 boost_zip = env.URLDownload(boost_arch_name, boost_url)
35 boost_dir = env.UnpackAll(boost_bootstrap, boost_zip)
36 boost_b2 = env.BoostBootstrap(boost_b2_name, boost_dir)
38 dep_sys_root = env['DEP_SYS_ROOT']
39 dep_src_dir = dep_sys_root + os.sep + 'include'
40 dep_lib_dir = dep_sys_root + os.sep + 'lib'
43 os.path.join(dep_src_dir, 'boost', 'config.hpp'),
44 os.path.join(dep_src_dir, 'boost', 'variant.hpp'),
45 os.path.join(dep_src_dir, 'boost', 'program_options.hpp'),
46 os.path.join(dep_src_dir, 'libboost_thread.a'),
47 os.path.join(dep_src_dir, 'libboost_atomic.a'),
48 os.path.join(dep_src_dir, 'libboost_system.a'),
49 os.path.join(dep_src_dir, 'libboost_program_options.a')
52 boost_build = env.BoostBuild(boost_targets, boost_b2, PREFIX=dep_sys_root, MODULES=modules)