Fix soft-sensor-manager service build errors
authorCaiwen Zhang <caiwen.zhang@intel.com>
Thu, 25 Dec 2014 10:25:56 +0000 (18:25 +0800)
committerCaiwen Zhang <caiwen.zhang@intel.com>
Fri, 26 Dec 2014 02:00:07 +0000 (10:00 +0800)
Change-Id: I96bd2463fe5f0fd9fd09d5b31570c0bc778019a7
Signed-off-by: Caiwen Zhang<caiwen.zhang@intel.com>
service/soft-sensor-manager/SConscript
service/soft-sensor-manager/SoftSensorPlugin/DiscomfortIndexSensor/src/DiscomfortIndexSensor.cpp

index 7ad090a..eb64e7e 100644 (file)
@@ -24,6 +24,13 @@ if target_os not in ['windows', 'winrt']:
        if target_os != 'android':
                soft_sensor_manager_env.AppendUnique(CXXFLAGS = ['-pthread'])
 
+if target_os == 'android':
+       soft_sensor_manager_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
+       soft_sensor_manager_env.AppendUnique(LIBS = ['gnustl_static'])
+
+       if not env.get('RELEASE'):
+               soft_sensor_manager_env.AppendUnique(LIBS = ['log'])
+
 #######################################################################
 ## build SSM SDK
 #######################################################################
@@ -111,7 +118,8 @@ SConscript('SampleApp/SConscript')
 ######################################################################
 # Copy description xml and deliverables
 ######################################################################
-Command("SSMTesterApp","SampleApp/linux/SSMTesterApp/SSMTesterApp", Copy("$TARGET", "$SOURCE"))
-Command("SoftSensorDescription.xml", "SoftSensorPlugin/SoftSensorDescription.xml", Copy("$TARGET", "$SOURCE"))
-Command("THSensorApp","SampleApp/linux/THSensorApp/THSensorApp", Copy("$TARGET", "$SOURCE"))
-Command("THSensorApp1","SampleApp/linux/THSensorApp1/THSensorApp1", Copy("$TARGET", "$SOURCE"))
\ No newline at end of file
+if target_os == 'linux':
+       Command("SSMTesterApp","SampleApp/linux/SSMTesterApp/SSMTesterApp", Copy("$TARGET", "$SOURCE"))
+       Command("SoftSensorDescription.xml", "SoftSensorPlugin/SoftSensorDescription.xml", Copy("$TARGET", "$SOURCE"))
+       Command("THSensorApp","SampleApp/linux/THSensorApp/THSensorApp", Copy("$TARGET", "$SOURCE"))
+       Command("THSensorApp1","SampleApp/linux/THSensorApp1/THSensorApp1", Copy("$TARGET", "$SOURCE"))
index 2dfe1a7..f789122 100644 (file)
 #include "DiscomfortIndexSensor.h"
 #include "SysTimer.h"
 
+#ifdef __ANDROID__
+#include "android_cpp11_compat.h"
+#endif
+
 using namespace DiscomfortIndexSensorName;
 
 #define SENSOR_NAME "DiscomfortIndexSensor"