Fix build error with scons-4.4.0 version which is based on python3
[platform/upstream/iotivity.git] / plugins / src / SConscript
index a586483..f6c139c 100644 (file)
@@ -29,19 +29,25 @@ target_os = env.get('TARGET_OS')
 src_dir = env.get('SRC_DIR')
 pi_path = os.path.join(src_dir, 'plugins')
 
-print"Reading PI script"
+print("Reading PI script")
 
 ######################################################################
 # Build flags
 ######################################################################
+with_unforked_libcoap = env.get('WITH_UNFORKED_LIBCOAP')
+if with_unforked_libcoap == '1':
+    # For bring up purposes only, we manually copy the forked version to where the unforked version is downloaded.
+    env.PrependUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include'])
+else:
+    # For bring up purposes only, the forked version will live here.
+    env.PrependUnique(CPPPATH = [os.path.join(src_dir, 'resource', 'csdk', 'connectivity', 'lib', 'libcoap-4.1.1', 'include')])
 
 env.PrependUnique(CPPPATH = [ os.path.join(src_dir, 'resource', 'c_common', 'oic_malloc', 'include'),
                               os.path.join(src_dir, 'resource', 'c_common', 'oic_string', 'include'),
                               os.path.join(src_dir, 'resource', 'c_common', 'oic_time', 'include'),
                               os.path.join(src_dir, 'resource', 'oc_logger', 'include'),
                               os.path.join(src_dir, 'resource', 'csdk', 'logger', 'include'),
-                              os.path.join(src_dir, 'resource', 'csdk', 'stack', 'include'),
-                              os.path.join(src_dir, 'resource', 'csdk', 'connectivity', 'lib', 'libcoap-4.1.1')
+                              os.path.join(src_dir, 'resource', 'csdk', 'stack', 'include')
                             ])
 env.AppendUnique(CPPPATH = [ os.path.join(pi_path, 'include'),
                              os.path.join(pi_path, 'include', 'internal'),
@@ -75,8 +81,8 @@ pi_src = [
 
 env.AppendUnique(PI_SRC = pi_src)
 
-print "Include path is %s" % env.get('CPPPATH')
-print "Files path is %s" % env.get('PI_SRC')
+print("Include path is %s" % env.get('CPPPATH'))
+print("Files path is %s" % env.get('PI_SRC'))
 if target_os in ['android', 'tizen']:
        calib = env.SharedLibrary('plugin_interface', env.get('PI_SRC'))
 else: