Add stte errors
[platform/core/uifw/stt.git] / client / CMakeLists.txt
1 SET(SRCS
2         stt.c
3         stt_client.c
4         stt_dbus.c
5         ../common/stt_config_mgr.c
6         ../common/stt_config_parser.c
7 )
8
9 SET(FILE_SRCS
10         stt_file.c
11         stt_file_client.c
12         ../common/stt_config_mgr.c
13         ../common/stt_config_parser.c
14         ../common/stt_engine.c
15         ../common/stt_network.c
16         ../server/sttd_client_data.c
17         ../server/sttd_config.c
18         ../server/sttd_dbus.c
19         ../server/sttd_dbus_server.c
20         ../server/sttd_engine_agent.c
21         ../server/sttd_recorder.c
22         ../server/sttd_server.c
23 )
24
25 set(SETTING_SRCS
26         stt_setting.c
27         ../common/stt_config_mgr.c
28         ../common/stt_config_parser.c
29 )
30
31 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
32 INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/include)
33 INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/server)
34
35 FOREACH(flag ${pkgs_CFLAGS})
36         SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
37 ENDFOREACH(flag)
38 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
39
40 ## Add definitions ##
41 ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
42
43 ## stt library ##
44 ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
45 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
46
47 ## stt file library ##
48 ADD_LIBRARY("${PROJECT_NAME}_file" SHARED ${FILE_SRCS})
49 TARGET_LINK_LIBRARIES("${PROJECT_NAME}_file" ${pkgs_LDFLAGS})
50
51 ## stt-setting library ##
52 ADD_LIBRARY("${PROJECT_NAME}_setting" SHARED ${SETTING_SRCS})
53 TARGET_LINK_LIBRARIES("${PROJECT_NAME}_setting" ${pkgs_LDFLAGS})
54
55 ## Install library files ##
56 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIBDIR} COMPONENT RuntimeLibraries)
57 INSTALL(TARGETS "${PROJECT_NAME}_file" DESTINATION ${LIBDIR} COMPONENT RuntimeLibraries)
58 INSTALL(TARGETS "${PROJECT_NAME}_setting" DESTINATION ${LIBDIR} COMPONENT RuntimeLibraries)