src_dir = lib_env.get('SRC_DIR')
+gtest_dir = src_dir + '/extlibs/gtest/gtest-1.7.0'
+
service_common_env = lib_env.Clone()
target_os = env.get('TARGET_OS')
# Build Test
######################################################################
service_common_test_env = service_common_env.Clone();
+
service_common_test_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
+service_common_test_env.PrependUnique(CPPPATH = [gtest_dir + '/include'])
-gtest = File(src_dir + '/extlibs/gtest/gtest-1.7.0/lib/.libs/libgtest.a')
-gtest_main = File(src_dir + '/extlibs/gtest/gtest-1.7.0/lib/.libs/libgtest_main.a')
+gtest = File(gtest_dir + '/lib/.libs/libgtest.a')
+gtest_main = File(gtest_dir + '/lib/.libs/libgtest_main.a')
service_common_test_env.PrependUnique(LIBS = [
'oc',
src_dir = lib_env.get('SRC_DIR')
+gtest_dir = src_dir + '/extlibs/gtest/gtest-1.7.0'
+
server_builder_env = lib_env.Clone()
target_os = env.get('TARGET_OS')
# Source files and Targets
######################################################################
server_builder_src = env.Glob('src/*.cpp')
+
server_builder_static = server_builder_env.StaticLibrary('server_builder', server_builder_src)
server_builder_shared = server_builder_env.SharedLibrary('server_builder', server_builder_src)
-server_builder_env.InstallTarget([server_builder_static,server_builder_shared], 'server_builder')
+server_builder_env.InstallTarget([server_builder_static, server_builder_shared], 'server_builder')
######################################################################
# Build Test
######################################################################
server_builder_test_env = server_builder_env.Clone();
-server_builder_test_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
-server_builder_test_env.AppendUnique(CPPPATH = [env.get('SRC_DIR')+'/extlibs/hippomocks-master'])
+server_builder_test_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
+server_builder_test_env.AppendUnique(CPPPATH = [
+ env.get('SRC_DIR')+'/extlibs/hippomocks-master',
+ gtest_dir + '/include'
+ ])
-gtest = File(src_dir + '/extlibs/gtest/gtest-1.7.0/lib/.libs/libgtest.a')
-gtest_main = File(src_dir + '/extlibs/gtest/gtest-1.7.0/lib/.libs/libgtest_main.a')
+gtest = File(gtest_dir + '/lib/.libs/libgtest.a')
+gtest_main = File(gtest_dir + '/lib/.libs/libgtest_main.a')
server_builder_test_env.PrependUnique(LIBS = [
- gtest,
- gtest_main,
'server_builder',
'service_common',
'pthread',
'oc_logger',
'connectivity_abstraction',
'coap',
+ gtest,
+ gtest_main,
])
server_builder_test_src = env.Glob('unittests/*.cpp')