Commit 0ea96982 authored by Vitalii Irkha's avatar Vitalii Irkha Committed by Aleksey

Build fix if flags SECURED=0 WITH_CLOUD=1 used

Fixed dependencies to cloud library

Change-Id: Idee7ee12f1d3c8bef5cb1b0fa8a599d36320484e
Signed-off-by: default avatarVitalii Irkha <v.irkha@samsung.com>
parent c3372a4b
......@@ -29,7 +29,7 @@ libocsrm_env = env.Clone()
target_os = libocsrm_env.get('TARGET_OS')
if target_os not in ['msys_nt', 'windows']:
if env.get('WITH_TCP') == True and env.get('WITH_CLOUD') == True:
if env.get('WITH_TCP') == True and env.get('WITH_CLOUD') == True and env.get('SECURED') == '1':
env.PrependUnique(LIBS=['cloud'])
######################################################################
......
......@@ -54,7 +54,7 @@ if target_os not in ['msys_nt', 'windows']:
provisioning_sample_env.PrependUnique(LIBS=['oc', 'octbstack'])
if target_os not in ['msys_nt', 'windows']:
if provisioning_sample_env.get('WITH_TCP') == True and provisioning_sample_env.get('WITH_CLOUD') == True:
if provisioning_sample_env.get('WITH_TCP') == True and provisioning_sample_env.get('WITH_CLOUD') == True and provisioning_sample_env.get('SECURED') == '1':
provisioning_sample_env.PrependUnique(
LIBS=['oc_logger', 'coap', 'cloud', 'ocpmapi', 'ocsrm'])
else:
......@@ -115,7 +115,7 @@ if target_os not in ['msys_nt', 'windows']:
rootcert = provisioning_sample_env.Install(
sec_provisioning_build_dir,
sec_provisioning_src_dir + 'rootca.crt')
if provisioning_sample_env.get('WITH_TCP') == True and provisioning_sample_env.get('WITH_CLOUD') == True:
if provisioning_sample_env.get('WITH_TCP') == True and provisioning_sample_env.get('WITH_CLOUD') == True and provisioning_sample_env.get('SECURED') == '1':
Alias("cloud", [
rootcert
])
......
......@@ -23,7 +23,7 @@ Import('provisioning_env')
provisioning_lib_env = provisioning_env.Clone()
#Build cloud library
if provisioning_lib_env.get('WITH_TCP') == True and provisioning_lib_env.get('WITH_CLOUD') == True:
if provisioning_lib_env.get('WITH_TCP') == True and provisioning_lib_env.get('WITH_CLOUD') == True and provisioning_lib_env.get('SECURED') == '1':
SConscript('cloud/SConscript', 'provisioning_env')
target_os = provisioning_lib_env.get('TARGET_OS')
......@@ -75,20 +75,6 @@ if provisioning_lib_env.get('MULTIPLE_OWNER') == '1':
'oxmpreconfpin.c'
]
if provisioning_lib_env.get('WITH_TCP') == True and provisioning_lib_env.get('WITH_CLOUD') == True:
provisioning_lib_env.AppendUnique(CPPDEFINES=['__WITH_TLS__'])
provisioning_src = provisioning_src + [
'cloud/utils.c',
'cloud/crl.c',
'cloud/aclgroup.c',
'cloud/aclinvite.c',
'cloud/aclid.c',
'cloud/csr.c',
'cloud/auth.c',
'cloud/cloudresource.c',
'cloud/config.c'
]
if target_os in ['linux', 'tizen', 'webos']:
provisioning_lib_env.ParseConfig('pkg-config --cflags --libs sqlite3')
else:
......
......@@ -32,7 +32,7 @@
#include "experimental/doxmresource.h"
#include "pstatresource.h"
#include "resourcemanager.h"
#if defined(WITH_CLOUD)
#if defined(WITH_CLOUD) && defined(SECURED)
#include "cloud/cloudresource.h"
#endif
#define TAG "OIC_SRM_DOS"
......@@ -408,7 +408,7 @@ static bool EnterRESET(void)
isAnonEnabled ? "" : "NOT ");
#endif // __WITH_DTLS__ or __WITH_TLS__
#if defined(WITH_CLOUD)
#if defined(WITH_CLOUD) && defined(SECURED)
ResetClouds();
#endif
......
......@@ -110,7 +110,7 @@ ocprovision_env.UserInstallTargetHeader(
'../include/OCProvisioningManager.hpp', 'resource', 'OCProvisioningManager.hpp')
if target_os in ['linux', 'msys_nt', 'tizen', 'webos']:
if ocprovision_env.get('WITH_TCP') == True and ocprovision_env.get('WITH_CLOUD') == True:
if ocprovision_env.get('WITH_TCP') == True and ocprovision_env.get('WITH_CLOUD') == True and ocprovision_env.get('SECURED') == '1':
ocprovision_env.PrependUnique(LIBS=['cloud'])
if target_os in ['linux', 'tizen']:
......
......@@ -104,7 +104,7 @@ if examples_env.get('MULTIPLE_OWNER') == '1':
examples_env.AppendUnique(CPPDEFINES=['MULTIPLE_OWNER'])
if target_os not in ['msys_nt', 'windows']:
if examples_env.get('WITH_TCP') == True and examples_env.get('WITH_CLOUD') == True:
if examples_env.get('WITH_TCP') == True and examples_env.get('WITH_CLOUD') == True and examples_env.get('SECURED') == '1':
examples_env.PrependUnique(LIBS=['cloud'])
######################################################################
......@@ -116,7 +116,7 @@ if examples_env.get('MULTIPLE_OWNER') == '1':
subownerclient = examples_env.Program('subownerclient',
'subownerclient.cpp')
if examples_env.get('WITH_TCP') == True and examples_env.get('WITH_CLOUD') == True:
if examples_env.get('WITH_TCP') == True and examples_env.get('WITH_CLOUD') == True and examples_env.get('SECURED') == '1':
cloudClient = examples_env.Program('cloudClient', [
'cloudClient.cpp', 'cloudAuth.cpp', 'cloudWrapper.cpp'
])
......@@ -131,7 +131,7 @@ actions += examples_env.ScanJSON('resource/provisioning/examples')
if examples_env.get('MULTIPLE_OWNER') != '1':
Delete(svr_db_build_dir + 'oic_svr_db_subowner_client.dat')
if examples_env.get('WITH_TCP') == True and examples_env.get('WITH_CLOUD') == True:
if examples_env.get('WITH_TCP') == True and examples_env.get('WITH_CLOUD') == True and examples_env.get('SECURED') == '1':
actions += examples_env.Install(svr_db_build_dir, svr_db_src_dir + 'rootca.crt')
else:
Delete(svr_db_build_dir + 'cloud.dat')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment