coap: use upstream libcoap header if desired
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Mon, 24 Oct 2016 08:13:55 +0000 (10:13 +0200)
committerPhil Coval <philippe.coval@osg.samsung.com>
Tue, 25 Oct 2016 21:10:51 +0000 (21:10 +0000)
Change-Id: I94540c72d320ebf87b996d5ddd614c898b8c157f
Origin: https://gerrit.iotivity.org/gerrit/#/c/13615/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/13615
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
Reviewed-by: David Antler <david.a.antler@intel.com>
service/coap-http-proxy/SConscript

index ea73450..366524a 100644 (file)
@@ -43,9 +43,17 @@ src_dir = env.get('SRC_DIR')
 local_env.AppendUnique(CPPPATH = ['include',
                         os.path.join(src_dir, 'resource/csdk/stack/include'),
                         os.path.join(src_dir, 'resource/csdk/connectivity/common/inc/'),
-                        os.path.join(src_dir, 'resource/csdk/connectivity/lib/libcoap-4.1.1/include'),
                         os.path.join(src_dir, 'extlibs/cjson'),
                ])
+
+with_upstream_libcoap = env.get('WITH_UPSTREAM_LIBCOAP')
+if with_upstream_libcoap == '1':
+    # For bring up purposes only,
+    # we manually copy the forked version to where the unforked version is downloaded.
+    env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include'])
+else:
+    env.AppendUnique(CPPPATH = ['#resource/csdk/connectivity/lib/libcoap-4.1.1/include')
+
 local_env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'connectivity_abstraction', 'coap'])
 if target_os not in ['windows']:
     local_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-Wextra'])