Fix for SVACE defects
[platform/upstream/iotivity.git] / build_common / external_libs.scons
index 432bbe5..85550d0 100644 (file)
@@ -28,6 +28,7 @@ Import('env')
 
 target_os = env.get('TARGET_OS')
 target_arch = env.get('TARGET_ARCH')
+rd_mode = env.get('RD_MODE')
 
 # for android, doesn't distinguish 'armeabi-v7a-hard' and 'armeabi-v7a' library
 if target_os == 'android':
@@ -40,8 +41,9 @@ if target_os == 'darwin':
 
 # External library include files are in <src_dir>/deps/<target_os>/include
 # the library binaries are in <src_dir>/deps/<target_os>/lib/<arch>
-env.AppendUnique(CPPPATH = [os.path.join(env.get('SRC_DIR'), 'deps', target_os, 'include')])
-env.AppendUnique(LIBPATH = [os.path.join(env.get('SRC_DIR'), 'deps', target_os, 'lib', target_arch)])
+if target_os not in ['windows']:
+       env.AppendUnique(CPPPATH = [os.path.join(env.get('SRC_DIR'), 'deps', target_os, 'include')])
+       env.AppendUnique(LIBPATH = [os.path.join(env.get('SRC_DIR'), 'deps', target_os, 'lib', target_arch)])
 
 # Check whether a library exists, if not, notify user to install it or try to
 # download the source code and build it
@@ -121,8 +123,24 @@ def __install_lib(ienv, lib):
 
 SConscript('tools/UnpackAll.py')
 
+# tinycbor build/fetch
+SConscript(os.path.join(env.get('SRC_DIR'), 'extlibs', 'tinycbor', 'SConscript'))
+
+with_ra = env.get('WITH_RA')
+if with_ra:
+       SConscript(os.path.join(env.get('SRC_DIR'), 'extlibs', 'raxmpp', 'SConscript'))
+
+with_ra_ibb = env.get('WITH_RA_IBB')
+if with_ra_ibb:
+       SConscript(os.path.join(env.get('SRC_DIR'), 'extlibs', 'wksxmppxep', 'SConscript'))
+
+
 env.AddMethod(__prepare_lib, "PrepareLib")
 env.AddMethod(__configure, "Configure")
 env.AddMethod(__download, "Download")
 env.AddMethod(__install_head_file, "InstallHeadFile")
 env.AddMethod(__install_lib, "InstallLib")
+
+if env.get('SECURED') == '1' or 'SERVER' in rd_mode:
+       if target_os not in ['linux', 'tizen']:
+               SConscript('#extlibs/sqlite3/SConscript')