1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
4 AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/test TEST_SRCS)
10 daemon/voice_control.c
12 daemon/datetime/util-time.c
13 daemon/datetime/datetime.c
14 daemon/sim_controller.c
15 daemon/minictrl/minictrl.c
17 daemon/notifications/noti_list_item.c
18 daemon/notifications/animated_image.c
19 daemon/notifications/activenoti.c
20 daemon/notifications/noti_view_listype.c
21 daemon/notifications/noti_box.c
22 daemon/notifications/noti_node.c
23 daemon/notifications/noti_section.c
24 daemon/notifications/noti_view_ongoing.c
25 daemon/notifications/noti_gridbox.c
26 daemon/notifications/noti_win.c
27 daemon/notifications/noti_view_boxtype.c
28 daemon/notifications/noti_listbox.c
29 daemon/notifications/noti_util.c
30 daemon/notifications/noti_view.c
31 daemon/notifications/noti.c
32 daemon/device/brightness.c
33 daemon/settings/modules/rotate-lock.c
34 daemon/settings/modules/ultra_power_saving.c
35 daemon/settings/modules/assistive_light.c
36 daemon/settings/modules/bluetooth.c
37 daemon/settings/modules/gps.c
38 daemon/settings/modules/wifi.c
39 daemon/settings/modules/tethering.c
40 daemon/settings/modules/mobile_data.c
41 daemon/settings/modules/sound-profile.c
42 daemon/settings/modules/flightmode.c
43 daemon/settings/settings_view_all.c
44 daemon/settings/settings_icon_common.c
45 daemon/settings/settings_gridbox.c
46 daemon/settings/settings_view_featured.c
47 daemon/settings/settings_ipc.c
48 daemon/settings/setting_module_api.c
49 daemon/settings/settings.c
50 daemon/settings/setting_utils.c
51 daemon/vi/vi_manager.c
53 daemon/handler_controller.c
54 daemon/service/animated_icon.c
55 daemon/service/emergency_mode.c
56 daemon/service/uninstall.c
57 daemon/service/reminder.c
58 daemon/service/keyboard.c
59 daemon/service/noti_led.c
60 daemon/service/smart_alert.c
62 daemon/page/page_base.c
63 daemon/page/pager_common.c
64 daemon/page/page_setting_all.c
65 daemon/page/page_edit.c
66 daemon/quickpanel-ui.c
73 SET(PACKAGE ${PROJECT_NAME})
74 SET(PREFIX "${CMAKE_INSTALL_PREFIX}/apps/${PKGNAME}")
75 SET(BINDIR "${PREFIX}/bin")
76 SET(RESDIR "${PREFIX}/res")
77 SET(LOCALEDIR "${RESDIR}/locale")
78 SET(ICONDIR "${RESDIR}/icons")
79 SET(EDJDIR "${RESDIR}/edje")
80 SET(DATADIR "${PREFIX}/data")
81 SET(DATADIR_RW "/opt/usr/apps/${PKGNAME}/data")
82 SET(DESKTOPDIR "/usr/share/applications")
83 SET(MANIFESTXMLDIR "/usr/share/packages")
84 SET(SHARED_DIR "${PREFIX}/shared/res")
86 IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
87 SET(CMAKE_BUILD_TYPE "Release")
88 ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
89 MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
92 ${CMAKE_CURRENT_SOURCE_DIR}/daemon
93 ${CMAKE_CURRENT_SOURCE_DIR}/daemon/minictrl
94 ${CMAKE_CURRENT_SOURCE_DIR}/daemon/notifications
95 ${CMAKE_CURRENT_SOURCE_DIR}/daemon/service
96 ${CMAKE_CURRENT_SOURCE_DIR}/daemon/settings
97 ${CMAKE_CURRENT_SOURCE_DIR}/daemon/settings/modules
98 ${CMAKE_CURRENT_SOURCE_DIR}/daemon/vi
99 ${CMAKE_CURRENT_SOURCE_DIR}/daemon/page
100 ${CMAKE_CURRENT_SOURCE_DIR}/daemon/datetime
101 ${CMAKE_CURRENT_SOURCE_DIR}/data
102 ${CMAKE_CURRENT_SOURCE_DIR}/test
105 INCLUDE(FindPkgConfig)
106 pkg_check_modules(pkgs REQUIRED
107 capi-appfw-application
108 capi-system-runtime-info
111 capi-location-manager
112 capi-network-tethering
113 capi-network-bluetooth
114 capi-network-connection
117 capi-media-sound-manager
118 capi-media-metadata-extractor
119 capi-system-system-settings
139 capi-appfw-package-manager
142 voice-control-setting
143 tzsh-quickpanel-service
146 FOREACH(flag ${pkgs_CFLAGS} ${x11_pkgs_CFLAGS})
147 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
150 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wall -g -O2 -fpie -Werror")
151 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
152 SET(CMAKE_C_FLAGS_RELEASE "-O2")
154 FIND_PROGRAM(UNAME NAMES uname)
155 EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
156 IF("${ARCH}" STREQUAL "arm")
157 ADD_DEFINITIONS("-DTARGET")
158 MESSAGE("add -DTARGET")
159 ENDIF("${ARCH}" STREQUAL "arm")
161 ADD_DEFINITIONS("-DQP_SETTING_ENABLE")
162 ADD_DEFINITIONS("-DQP_BRIGHTNESS_ENABLE")
163 ADD_DEFINITIONS("-DQP_MINICTRL_ENABLE")
164 ADD_DEFINITIONS("-DQP_SCREENREADER_ENABLE")
165 ADD_DEFINITIONS("-DQP_SMART_ALERT_ENABLE")
166 ADD_DEFINITIONS("-DQP_SERVICE_NOTI_LED_ENABLE")
167 ADD_DEFINITIONS("-DQP_ANIMATED_IMAGE_ENABLE")
168 ADD_DEFINITIONS("-DQP_REMINDER_ENABLE")
169 #ADD_DEFINITIONS("-DQP_EMERGENCY_MODE_ENABLE")
170 ADD_DEFINITIONS("-DQP_VOICE_CONTROL_ENABLE")
172 ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
173 ADD_DEFINITIONS("-DPACKAGE_NAME=\"${PKGNAME}\"")
174 ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
175 ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"")
176 ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
177 ADD_DEFINITIONS("-DICONDIR=\"${ICONDIR}\"")
178 ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"")
179 ADD_DEFINITIONS("-DDATADIR=\"${DATADIR}\"")
180 ADD_DEFINITIONS("-DDATADIR_RW=\"${DATADIR_RW}\"")
181 ADD_DEFINITIONS("-DSHARED_DIR=\"${SHARED_DIR}\"")
183 #ADD_DEFINITIONS("-DFILE_DEBUG")
184 ADD_DEFINITIONS("-D_DLOG_USED")
185 #ADD_DEFINITIONS("-DHAVE_X")
187 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
189 ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
190 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} ${x11_pkgs_LDFLAGS} "-pie")
192 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})
193 INSTALL(DIRECTORY DESTINATION ${DATADIR})
194 INSTALL(DIRECTORY DESTINATION ${DATADIR_RW})
195 INSTALL(FILES ${CMAKE_SOURCE_DIR}/icons/quickpanel_icon_default.png DESTINATION ${RESDIR})
198 INSTALL(FILES ${CMAKE_SOURCE_DIR}/icons/settings_noti_panel.png DESTINATION ${SHARED_DIR}/icons)
200 # icons for notification
201 INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/data/images_noti_icons/ DESTINATION ${SHARED_DIR}/noti_icons FILES_MATCHING PATTERN "*.png")
204 INSTALL(FILES ${CMAKE_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME ${PKGNAME})
207 ADD_SUBDIRECTORY(data)