1 #******************************************************************
3 # Copyright 2014 Intel Mobile Communications GmbH All Rights Reserved.
5 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
19 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
21 ######################################################################
22 # This script manages third party libraries
24 #Note: The paths must keep consistent with oic-utilities
25 ######################################################################
29 Import('env', 'lib_env')
31 target_os = env.get('TARGET_OS')
32 target_arch = env.get('TARGET_ARCH')
33 src_dir = env.get('SRC_DIR')
36 ######################################################################
37 # Check dependent packages (Linux only)
38 ######################################################################
39 if target_os in ['linux', 'tizen']:
40 if not env.GetOption('help'):
41 if not target_arch == platform.machine():
43 *********************************** Warning ***********************************
44 * You are trying cross build, please make sure (%s) version libraries are *
46 *******************************************************************************
49 conf = Configure(lib_env)
51 if not conf.CheckLib('glib-2.0'):
52 print 'Install glib-2 on ubuntu with the following command'
53 print 'sudo apt-get install libglib2.0-dev'
59 ######################################################################
60 # The path of third party libraries binary
61 ######################################################################
62 if target_os == 'android':
63 if target_arch == 'armeabi-v7a-hard':
64 target_arch = 'armeabi-v7a'
66 if target_arch not in ['x86', 'armeabi', 'armeabi-v7a']:
67 if not env.GetOption('help') and not env.GetOption('clean'):
69 *********************************** Warning ***********************************
70 * current only x86, armeabi, armeabi-v7a libraries are provided! *
71 *******************************************************************************
74 # Too much boost warning, suppress the warning
75 lib_env.AppendUnique(CCFLAGS = ['-w'])
77 elif target_os == 'ios':
78 lib_env.AppendUnique(FRAMEWORKS = ['boost'])
79 elif target_os == 'darwin':
80 lib_env.AppendUnique(CPPPATH = ['/usr/local/include'])
81 lib_env.AppendUnique(LIBPATH = ['/usr/local/lib'])