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')
16 ######################################################################
17 # Check dependent packages (Linux only)
18 ######################################################################
19 if target_os in ['linux', 'tizen']:
20 if not env.GetOption('help'):
21 if not target_arch == platform.machine():
23 *********************************** Warning ***********************************
24 * You are trying cross build, please make sure (%s) version libraries are
26 *******************************************************************************
29 conf = Configure(lib_env)
31 if not conf.CheckLib('boost_program_options'):
32 print 'Did not find boost_program_options, exiting!'
35 if not conf.CheckLib('glib-2.0'):
36 print 'Install glib-2 on ubuntu with the following command'
37 print 'sudo apt-get install libglib2.0-dev'
43 ######################################################################
44 # The path of third party libraries binary
45 ######################################################################
46 if target_os == 'android':
47 if target_arch == 'armeabi-v7a-hard':
48 target_arch = 'armeabi-v7a'
50 if target_arch not in ['x86', 'armeabi', 'armeabi-v7a']:
51 if not env.GetOption('help') and not env.GetOption('clean'):
53 *********************************** Warning ***********************************
54 * current only x86, armeabi, armeabi-v7a libraries are provided! *
55 *******************************************************************************
58 # Too much boost warning, suppress the warning
59 lib_env.AppendUnique(CCFLAGS = ['-w'])
61 elif target_os == 'ios':
62 lib_env.AppendUnique(FRAMEWORKS = ['boost'])
63 elif target_os == 'darwin':
64 lib_env.AppendUnique(CPPPATH = ['/usr/local/include'])
65 lib_env.AppendUnique(LIBPATH = ['/usr/local/lib'])