1 ######################################################################
2 # This script manages third party libraries
4 #Note: The paths must keep consistent with oic-utilities
5 ######################################################################
9 Import('env', 'lib_env')
11 target_os = env.get('TARGET_OS')
12 target_arch = env.get('TARGET_ARCH')
13 src_dir = env.get('SRC_DIR')
15 if target_os not in ['linux', 'darwin']:
16 utils_path = env.get('OIC_UTILS')
18 ######################################################################
19 # Check dependent packages (Linux only)
20 ######################################################################
21 if target_os == 'linux':
22 if not env.GetOption('help'):
23 if not target_arch == platform.machine():
25 *********************************** Warning ***********************************
26 * You are trying cross build, please make sure (%s) version libraries are
28 *******************************************************************************
31 conf = Configure(lib_env)
33 if not conf.CheckLib('boost_program_options'):
34 print 'Did not find boost_program_options, exiting!'
39 ######################################################################
40 # The 'include' path of third party libraries
41 ######################################################################
42 if target_os == 'android':
43 lib_env.AppendUnique(CPPPATH = [utils_path + '/android/boost/include'])
45 ######################################################################
46 # The path of third party libraries binary
47 ######################################################################
48 if target_os == 'android':
49 if target_arch == 'armeabi-v7a-hard':
50 target_arch = 'armeabi-v7a'
52 if target_arch not in ['x86', 'armeabi', 'armeabi-v7a']:
53 if not env.GetOption('help') and not env.GetOption('clean'):
55 *********************************** Warning ***********************************
56 * current only x86, armeabi, armeabi-v7a libraries are provided! *
57 *******************************************************************************
60 lib_env.AppendUnique(LIBPATH = [utils_path + '/android/boost/libs/' + target_arch])
61 # Too much boost warning, suppress the warning
62 lib_env.AppendUnique(CCFLAGS = ['-w'])
64 elif target_os == 'ios':
65 lib_env.AppendUnique(FRAMEWORKPATH = [utils_path + '/ios/frameworks/'])
66 lib_env.AppendUnique(FRAMEWORKS = ['boost'])
67 elif target_os == 'darwin':
68 lib_env.AppendUnique(CPPPATH = ['/usr/local/include'])
69 lib_env.AppendUnique(LIBPATH = ['/usr/local/lib'])