Merge with Tizen 2.3
[platform/core/uifw/tts.git] / server / CMakeLists.txt
1 SET(SRCS 
2         ttsd_config.c
3         ttsd_data.cpp
4         ttsd_dbus.c
5         ttsd_dbus_server.c
6         ttsd_engine_agent.c
7         ttsd_main.c
8         ttsd_network.c
9         ttsd_player.c
10         ttsd_server.c
11         ../common/tts_config_mgr.c
12         ../common/tts_config_parser.c
13 )
14         
15 SET(NOTI_SRCS
16         ttsd_config.c
17         ttsd_data.cpp
18         ttsd_dbus.c
19         ttsd_dbus_server.c
20         ttsd_engine_agent.c
21         ttsd_main_noti.c
22         ttsd_network.c
23         ttsd_player.c
24         ttsd_server.c
25         ../common/tts_config_mgr.c
26         ../common/tts_config_parser.c
27 )       
28
29 SET(SR_SRCS
30         ttsd_config.c
31         ttsd_data.cpp
32         ttsd_dbus.c
33         ttsd_dbus_server.c
34         ttsd_engine_agent.c
35         ttsd_main_sr.c
36         ttsd_network.c
37         ttsd_player.c
38         ttsd_server.c
39         ../common/tts_config_mgr.c
40         ../common/tts_config_parser.c
41 )
42
43 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
44 INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/common)
45
46 FOREACH(flag ${pkgs_CFLAGS})
47         SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
48 ENDFOREACH(flag)
49
50 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE")
51 SET(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE")
52 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
53 SET(CMAKE_C_FLAGS_RELEASE "-O2")
54 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
55
56 ## Executable ##
57 ADD_EXECUTABLE("${PROJECT_NAME}-daemon" ${SRCS})
58 TARGET_LINK_LIBRARIES("${PROJECT_NAME}-daemon" -ldl ${pkgs_LDFLAGS})
59
60 ADD_EXECUTABLE("${PROJECT_NAME}-daemon-noti" ${NOTI_SRCS})
61 TARGET_LINK_LIBRARIES("${PROJECT_NAME}-daemon-noti" -ldl ${pkgs_LDFLAGS})
62
63 ADD_EXECUTABLE("${PROJECT_NAME}-daemon-sr" ${SR_SRCS})
64 TARGET_LINK_LIBRARIES("${PROJECT_NAME}-daemon-sr" -ldl ${pkgs_LDFLAGS})
65
66 ## Install ##
67 INSTALL(TARGETS "${PROJECT_NAME}-daemon" DESTINATION bin)
68 INSTALL(TARGETS "${PROJECT_NAME}-daemon-noti" DESTINATION bin)
69 INSTALL(TARGETS "${PROJECT_NAME}-daemon-sr" DESTINATION bin)