)
SET (${this_target}_SOURCE_FILES
- src/system/FSys_SettingService.cpp
- src/runtime/FSys_RuntimeInfoStub.cpp
src/FApp_PackageManagerStub.cpp
src/FUi_UiManagerStub.cpp
src/CommonService.cpp
src/CommonServiceEntry.cpp
- src/FSys_SystemServiceIpcEventForAsync.cpp
)
-#ADD_SUBDIRECTORY(src/system)
+ADD_SUBDIRECTORY(src/system)
## SET EXTRA COMPILER FLAGS
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fPIE -Wall -pthread -g3" )
SET(CMAKE_INSTALL_RPATH "/usr/lib/osp-server")
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
-## Create Library
+## Create Executable
ADD_EXECUTABLE (${this_target} ${${this_target}_SOURCE_FILES})
+## Create Shared Library
+SET(STATIC_LIBS system_service)
+
+SET_TARGET_PROPERTIES(${this_target} PROPERTIES LINK_INTERFACE_LIBRARIES "")
+
+ADD_DEPENDENCIES(${this_target} ${STATIC_LIBS})
+
+MACRO(OSP_ADD_OBJS_IN_ARCHIVE archives)
+ SET(LINK_OBJECTS_IN_ARCHIVE)
+ FOREACH(archive ${ARGV})
+ SET(LINK_OBJECTS_IN_ARCHIVE "${LINK_OBJECTS_IN_ARCHIVE} -l${archive}")
+ ENDFOREACH(archive)
+ SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--whole-archive ${LINK_OBJECTS_IN_ARCHIVE} -Wl,-no-whole-archive")
+ENDMACRO(OSP_ADD_OBJS_IN_ARCHIVE)
+
+OSP_ADD_OBJS_IN_ARCHIVE(${STATIC_LIBS})
+
+SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--as-needed")
+
+TARGET_LINK_LIBRARIES( ${this_target} ${STATIC_LIBS})
+
TARGET_LINK_LIBRARIES(${this_target} -Xlinker --no-undefined -Xlinker --as-needed -pie)
TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-appfw -lchromium")
TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-uifw" )
-SET (this_target system)
+SET (this_target system_service)
INCLUDE_DIRECTORIES(
${SLP_INCLUDE_DIRS}
SET (${this_target}_SOURCE_FILES
FSys_SettingService.cpp
+ FSys_RuntimeInfoStub.cpp
+ FSys_SystemServiceIpcEventForAsync.cpp
)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
r = __ipcServer.Start();
SysTryCatch(NID_SYS, r == E_SUCCESS, , r, "It is failed to start IPC server.");
+ r = __responseMessage.Construct();
+ SysTryCatch(NID_SYS, r == E_SUCCESS, , r, "It is failed to create response message container.");
+
CATCH:
if(r != E_SUCCESS)
{
__pSettingInfo->RemoveSettingEventListener(*this);
__pSettingInfo = null;
result r = __ipcServer.Stop();
+ __responseMessage.RemoveAll(true);
SysTryReturnVoidResult(NID_SYS, r == E_SUCCESS, r, "It is failed to stop IPC server.");
}
SysTryCatch(NID_SYS, response != null, r = E_SYSTEM, r, "There is no response instance.");
+ __responseMessage.RemoveAll(true);
pCommand = (String*)request.GetAt(SETTING_SERVICE_IPC_MSG_COMMAND);
SysTryCatch(NID_SYS, pCommand != null, r = E_SYSTEM, r, "There is no command information.");
SysLog(NID_SYS, "Value is %ls.", pValue->GetPointer());
response->Add(pValue);
}
+
+ __responseMessage.AddItems(*response);
}
return true;