Move some func to notification_viewer.c
[platform/core/api/notification.git] / CMakeLists.txt
1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2 PROJECT(notification C)
3
4 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
5 SET(EXEC_PREFIX "\${prefix}")
6 SET(LIBDIR ${LIB_INSTALL_DIR})
7 SET(INCLUDEDIR "\${prefix}/include/${PROJECT_NAME}")
8
9 #ADD_SUBDIRECTORY(test-app)
10
11 SET(INIT-SRCS
12         ./src/notification_init.c
13 )
14
15 SET(SRCS
16         ./src/notification.c
17         ./src/notification_noti.c
18         ./src/notification_ongoing.c
19         ./src/notification_group.c
20         ./src/notification_db.c
21         ./src/notification_list.c
22         ./src/notification_status.c
23         ./src/notification_ipc.c
24         ./src/notification_setting.c
25         ./src/notification_setting_service.c
26         ./src/notification_internal.c
27         ./src/notification_viewer.c
28         ./src/notification_error.c)
29 SET(HEADERS-DEVEL
30         ./include/notification.h
31         ./include/notification_internal.h
32         ./include/notification_db.h
33         ./include/notification_error.h
34         ./include/notification_type.h
35         ./include/notification_list.h
36         ./include/notification_ongoing.h
37         ./include/notification_ongoing_flag.h
38         ./include/notification_text_domain.h
39         ./include/notification_status.h
40         ./include/notification_status_internal.h
41         ./include/notification_setting.h
42         ./include/notification_setting_internal.h
43         ./include/notification_ipc.h
44         ./include/notification_noti.h
45         ./include/notification_setting_service.h
46         ./include/notification_viewer.h
47    )
48
49 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
50
51 INCLUDE(FindPkgConfig)
52 pkg_check_modules(pkgs REQUIRED
53         sqlite3
54         db-util
55         vconf
56         bundle
57         dlog
58         aul
59         dbus-1
60         dbus-glib-1
61         capi-appfw-app-control
62         capi-appfw-package-manager
63         pkgmgr-info
64         libtzplatform-config
65         glib-2.0
66         gio-2.0
67         iniparser
68 )
69
70 FOREACH(flag ${pkgs_CFLAGS})
71         SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
72 ENDFOREACH(flag)
73
74 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -g -Wall")
75 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
76
77 SET(CMAKE_SKIP_BUILD_RPATH TRUE)
78
79 IF (HAVE_X11)
80 ADD_DEFINITIONS("-DHAVE_X11")
81 ENDIF (HAVE_X11)
82
83 IF (HAVE_WAYLAND)
84 ADD_DEFINITIONS("-DHAVE_WAYLAND")
85 ENDIF (HAVE_WAYLAND)
86
87 ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
88 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${MAJORVER})
89 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${FULLVER})
90 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
91
92 ADD_EXECUTABLE(notification_init ${INIT-SRCS})
93 TARGET_LINK_LIBRARIES(notification_init ${pkgs_LDFLAGS} notification)
94
95 MESSAGE(STATUS "LIB_INSTALL_DIR: " ${LIB_INSTALL_DIR})
96
97 CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY)
98 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries)
99 INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
100
101 FOREACH(hfile ${HEADERS-DEVEL})
102         INSTALL(FILES ${CMAKE_SOURCE_DIR}/${hfile} DESTINATION include/${PROJECT_NAME})
103 ENDFOREACH(hfile)
104
105 INSTALL(FILES ${CMAKE_BINARY_DIR}/11_notification-add.post DESTINATION ${SYSCONF_INSTALL_DIR}/gumd/useradd.d/)
106 INSTALL(TARGETS notification_init DESTINATION bin)