os.rename(sqlite_h_tmp, sqlite_h)
os.remove(sqlite_zip_file)
shutil.rmtree(sqlite_tmp_dir)
+
+if target_os in ['windows']:
+ libsqlite3 = sqlite_env.StaticLibrary('sqlite3', sqlite_c)
+ # In multi-threaded builds, SCons appears to proceed to using sqlite3.lib
+ # before finishing InstallTarget(libsqlite3, 'sqlite3') here. So, use the
+ # generated LIB directly, without installing it.
+ env.AppendUnique(LIBPATH = [os.path.join(env.get('BUILD_DIR'), 'extlibs/sqlite3')])
char var = uuid[i];
//Check if a hyphen is expected here.
- if (i = hyphens[counter] -1)
+ if (i == (hyphens[counter] - 1))
{
//We need a hyphen here.
- if('-' != var)
+ if ('-' != var)
{
//The character is not a hyphen.
return false;
RD_SRC_DIR + 'internal/rd_database.c',
RD_SRC_DIR + 'rd_server.c',
]
- if target_os not in ['linux', 'tizen'] :
+ if target_os not in ['linux', 'tizen', 'windows'] :
rd_src += [ '../../../extlibs/sqlite3/sqlite3.c' ]
if 'CLIENT' in rd_mode:
provisioning_env.ParseConfig('pkg-config --cflags --libs sqlite3')
else:
provisioning_env.AppendUnique(CPPPATH = ['#/extlibs/sqlite3'])
- provisioning_src = provisioning_src + ['#/extlibs/sqlite3/sqlite3.c' ]
+ if target_os not in ['windows']:
+ provisioning_src = provisioning_src + ['#/extlibs/sqlite3/sqlite3.c' ]
if target_os in ['android']:
provisioning_env.AppendUnique(LINKFLAGS = ['-Wl,-soname,libocpmapi.so'])
if target_os == 'tizen':
provisioning_sample_env.AppendUnique(CPPDEFINES = ['__TIZEN__'])
+
if target_os in ['linux', 'tizen']:
provisioning_sample_env.ParseConfig('pkg-config --cflags --libs sqlite3')
+else:
+ if target_os in ['windows']:
+ provisioning_sample_env.AppendUnique(LIBS = ['sqlite3'])
+
######################################################################
# Source files and Targets
sptest_env.AppendUnique(CPPDEFINES=['MULTIPLE_OWNER'])
if target_os in ['msys_nt', 'windows']:
- sptest_env.AppendUnique(LIBS = ['octbstack_static'])
+ sptest_env.AppendUnique(LIBS = ['octbstack_static', 'sqlite3'])
else:
sptest_env.AppendUnique(LIBS = ['octbstack'])
# //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#
Import('libocsrm_env')
+import os
tools_env = libocsrm_env.Clone()
src_dir = tools_env.get('SRC_DIR')
if target_os in ['msys_nt', 'windows']:
# octbstack.dll doesn't export all the functions called by this app, so use static LIBs instead.
tools_env.AppendUnique(LIBS = ['coap', 'tinydtls', 'mbedtls', 'mbedx509', 'mbedcrypto',
- 'octbstack_static', 'ocsrm', 'connectivity_abstraction'])
+ 'octbstack_static', 'ocsrm', 'connectivity_abstraction', 'sqlite3'])
elif target_os in ['darwin']:
tools_env.AppendUnique(LIBS = ['coap', 'tinydtls', 'mbedtls', 'mbedx509', 'mbedcrypto',
'octbstack', 'ocsrm', 'connectivity_abstraction'])
srmtest_env.AppendUnique(CPPDEFINES=['MULTIPLE_OWNER'])
if target_os == 'windows':
- srmtest_env.AppendUnique(LINKFLAGS = ['/subsystem:CONSOLE'])
- srmtest_env.AppendUnique(LIBS = ['octbstack_static'])
+ srmtest_env.AppendUnique(LIBS = ['octbstack_static', 'sqlite3'])
else:
# TODO: Implement feature check.
srmtest_env.AppendUnique(CPPDEFINES = ['HAVE_LOCALTIME_R'])
# liboctbstack (share library) build script
##
Import('env')
+import os
liboctbstack_env = env.Clone()
if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
liboctbstack_env.PrependUnique(CPPPATH = ['#resource/csdk/resource-directory/include'])
+
+ if target_os in ['windows']:
+ liboctbstack_env.AppendUnique(LIBS = ['sqlite3'])
+
if 'CLIENT' in rd_mode:
liboctbstack_env.AppendUnique(CPPDEFINES = ['RD_CLIENT'])
+
if 'SERVER' in rd_mode:
liboctbstack_env.AppendUnique(CPPDEFINES = ['RD_SERVER'])
if target_os in ['tizen']:
if 'SERVER' in rd_mode:
liboctbstack_src.append(OCTBSTACK_SRC + 'oicresourcedirectory.c')
- if target_os not in ['linux', 'tizen']:
+ if target_os not in ['linux', 'tizen', 'windows']:
liboctbstack_src.append('#extlibs/sqlite3/sqlite3.c')
if target_os in ['linux']:
if target_os not in ['msys_nt', 'windows']:
stacktest_env.PrependUnique(LIBS = ['m'])
+else:
+ stacktest_env.PrependUnique(LIBS = ['sqlite3'])
if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
stacktest_env.PrependUnique(LIBS = ['resource_directory'])
if target_os in ['windows']:
unittests_env.AppendUnique(CPPPATH = ['#extlibs/boost/boost'])
+ unittests_env.AppendUnique(LIBS = ['sqlite3'])
# On Windows, octbstack_test is a static LIB, that makes calls into static LIB ocsrm.
# On other platforms, octbstack_test is a shared LIB, that includes static LIB ocsrm.
unittests_env.AppendUnique(LIBS = ['ocsrm'])
set ROUTING=EP
set WITH_UPSTREAM_LIBCOAP=1
set BINDIR=debug
+set RD_MODE=CLIENT,SERVER
set RUN_ARG=%1
SHIFT
set PATH=!PATH!;!BUILD_DIR!;C:\msys64\mingw64\bin
)
-set BUILD_OPTIONS= TARGET_OS=%TARGET_OS% TARGET_ARCH=%TARGET_ARCH% RELEASE=%RELEASE% WITH_RA=0 TARGET_TRANSPORT=IP SECURED=%SECURED% WITH_TCP=%WITH_TCP% BUILD_SAMPLE=ON LOGGING=%LOGGING% TEST=%TEST% RD_MODE=CLIENT ROUTING=%ROUTING% WITH_UPSTREAM_LIBCOAP=%WITH_UPSTREAM_LIBCOAP% MULTIPLE_OWNER=%MULTIPLE_OWNER% -j %THREAD_COUNT%
+set BUILD_OPTIONS= TARGET_OS=%TARGET_OS% TARGET_ARCH=%TARGET_ARCH% RELEASE=%RELEASE% WITH_RA=0 TARGET_TRANSPORT=IP SECURED=%SECURED% WITH_TCP=%WITH_TCP% BUILD_SAMPLE=ON LOGGING=%LOGGING% TEST=%TEST% RD_MODE=%RD_MODE% ROUTING=%ROUTING% WITH_UPSTREAM_LIBCOAP=%WITH_UPSTREAM_LIBCOAP% MULTIPLE_OWNER=%MULTIPLE_OWNER% -j %THREAD_COUNT%
REM Use MSVC_VERSION=12.0 for VS2013, or MSVC_VERSION=14.0 for VS2015.
REM If MSVC_VERSION has not been defined here, SCons chooses automatically a VS version.