Commit 71ba42e5 authored by Philippe Coval's avatar Philippe Coval Committed by Phil Coval

linux: Use sqlite from system like Tizen does

It must be installed before building,
 For instance on debian and derived:
 apt-get install libsqlite3-dev

Note for later, it would make sense to move
 all those platform tests into sqlite sconfile.

Bug: https://jira.iotivity.org/browse/IOT-1296
Change-Id: I431a11821844bef8eabba30e1111b1ebf0799d66
Origin: https://gerrit.iotivity.org/gerrit/#/c/9135/Signed-off-by: default avatarPhilippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/9135Tested-by: default avatarjenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: default avatarDave Thaler <dthaler@microsoft.com>
parent 64c27919
......@@ -141,9 +141,9 @@ env.AddMethod(__download, "Download")
env.AddMethod(__install_head_file, "InstallHeadFile")
env.AddMethod(__install_lib, "InstallLib")
if env.get('SECURED') == '1' and target_os != 'tizen':
if env.get('SECURED') == '1' and target_os not in ['linux', 'tizen']:
SConscript(os.path.join(env.get('SRC_DIR'), 'extlibs', 'sqlite3', 'SConscript'))
if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
if target_os not in ['tizen']:
if target_os not in ['linux', 'tizen']:
SConscript(os.path.join(env.get('SRC_DIR'), 'extlibs', 'sqlite3', 'SConscript'))
......@@ -11,7 +11,7 @@ sqlite_env = env.Clone()
target_os = sqlite_env.get('TARGET_OS')
src_dir = sqlite_env.get('SRC_DIR')
targets_need_sqlite = ['linux', 'android', 'msys_nt', 'windows']
targets_need_sqlite = ['android', 'msys_nt', 'windows']
sqlite_dir = src_dir + '/extlibs/sqlite3/'
sqlite_build_dir = src_dir + '/extlibs/sqlite3/sqlite-amalgamation-3081101/'
sqlite_zip_file = src_dir + '/extlibs/sqlite3/sqlite-amalgamation-3081101.zip'
......
......@@ -123,7 +123,6 @@ else:
if target_os in ['tizen', 'linux']:
liboctbstack_env.ParseConfig("pkg-config --cflags --libs uuid")
if target_os in ['tizen']:
liboctbstack_env.ParseConfig('pkg-config --cflags --libs sqlite3')
if target_os == 'arduino':
......
......@@ -55,7 +55,7 @@ if target_os == 'android':
if not env.get('RELEASE'):
rd_env.AppendUnique(LIBS = ['log'])
if target_os in ['tizen']:
if target_os in ['linux', 'tizen']:
rd_env.ParseConfig('pkg-config --cflags --libs sqlite3')
else:
rd_env.AppendUnique(CPPPATH = ['../../../extlibs/sqlite3'])
......@@ -71,7 +71,7 @@ if 'SERVER' in rd_mode:
RD_SRC_DIR + 'internal/rd_database.c',
RD_SRC_DIR + 'rd_server.c',
]
if target_os not in ['tizen'] :
if target_os not in ['linux', 'tizen'] :
rd_src += [ '../../../extlibs/sqlite3/sqlite3.c' ]
if 'CLIENT' in rd_mode:
......
......@@ -120,7 +120,7 @@ if provisioning_env.get('WITH_TCP') == True:
'src/cloud/aclid.c',
'src/cloud/csr.c']
if target_os in ['tizen']:
if target_os in ['linux', 'tizen']:
provisioning_env.ParseConfig('pkg-config --cflags --libs sqlite3')
else:
provisioning_env.AppendUnique(CPPPATH = ['../../../../extlibs/sqlite3'])
......
......@@ -93,6 +93,7 @@ provisioning_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
if target_os == 'tizen':
provisioning_env.AppendUnique(CPPDEFINES = ['__TIZEN__'])
if target_os in ['linux', 'tizen']:
provisioning_env.ParseConfig('pkg-config --cflags --libs sqlite3')
######################################################################
......
......@@ -75,6 +75,7 @@ if target_os == 'android':
if target_os == 'tizen':
oclib_env.AppendUnique(CPPDEFINES = ['__TIZEN__'])
if target_os in ['linux', 'tizen']:
oclib_env.ParseConfig('pkg-config --cflags --libs sqlite3')
if target_os in ['linux'] and oclib_env.get('SIMULATOR', False):
......
......@@ -51,7 +51,7 @@ enrollee_env.PrependUnique(CPPPATH = [
enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/inc',
enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/src'])
if target_os not in ['tizen']:
if target_os not in ['linux', 'tizen']:
enrollee_env.PrependUnique(CPPPATH = [
enrollee_env.get('SRC_DIR') + '/extlibs/sqlite3'])
......
......@@ -94,8 +94,9 @@ if target_os in ['android','linux']:
env.get('SRC_DIR') + '/resource/csdk/logger/include',
env.get('SRC_DIR') + '/resource/csdk/security/include',
env.get('SRC_DIR') + '/extlibs/cjson',
env.get('SRC_DIR') + '/extlibs/sqlite3',
env.get('SRC_DIR') + '/service/easy-setup/inc'])
if target_os not in ['linux', 'tizen']:
easy_setup_env.PrependUnique(CPPPATH = [env.get('SRC_DIR') + '/extlibs/sqlite3'])
if env.get('SECURED') == '1':
with_upstream_libcoap = easy_setup_env.get('WITH_UPSTREAM_LIBCOAP')
if with_upstream_libcoap == '1':
......
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