From 8f09f2417bb730921a681c1c7638cefdadab8ecc Mon Sep 17 00:00:00 2001 From: Philippe Coval Date: Mon, 24 Oct 2016 10:13:55 +0200 Subject: [PATCH] coap: use upstream libcoap header if desired Change-Id: I94540c72d320ebf87b996d5ddd614c898b8c157f Origin: https://gerrit.iotivity.org/gerrit/#/c/13615/ Signed-off-by: Philippe Coval Reviewed-on: https://gerrit.iotivity.org/gerrit/13615 Tested-by: jenkins-iotivity Reviewed-by: Habib Virji Reviewed-by: David Antler --- service/coap-http-proxy/SConscript | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/service/coap-http-proxy/SConscript b/service/coap-http-proxy/SConscript index ea73450..366524a 100644 --- a/service/coap-http-proxy/SConscript +++ b/service/coap-http-proxy/SConscript @@ -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']) -- 2.7.4