[mobile] Remove password lockscreen
[apps/native/starter.git] / CMakeLists.txt
1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2 PROJECT(starter C)
3
4 SET(PACKAGE ${PROJECT_NAME})
5 SET(PKGNAME "org.tizen.${PACKAGE}")
6 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
7 SET(BINDIR "${PREFIX}/bin")
8 SET(DATADIR "${PREFIX}/share")
9 SET(RESDIR "${PREFIX}/res")
10 SET(LOCALEDIR "${PREFIX}/share/locale")
11
12 IF("${TIZEN_PROFILE_NAME}" STREQUAL "COMMON")
13
14 INCLUDE_DIRECTORIES(
15         ${CMAKE_SOURCE_DIR}/include
16         ${CMAKE_SOURCE_DIR}/include/common
17 )
18 INCLUDE(FindPkgConfig)
19 pkg_check_modules(pkgs REQUIRED
20         aul
21         capi-system-media-key
22         db-util
23         dlog
24         ecore
25         ecore-wayland
26         ecore-evas
27         ecore-input
28         edbus
29         eina
30         elementary
31         evas
32         syspopup-caller
33         vconf
34         appcore-efl
35         glib-2.0
36         ui-gadget-1
37         bundle
38         capi-appfw-application
39         capi-appfw-app-manager
40         capi-network-bluetooth
41         capi-system-system-settings
42         feedback
43         alarm-service
44         pkgmgr-info
45         deviced
46         edbus
47         dbus-1
48         dbus-glib-1
49         tts
50         capi-message-port
51         efl-extension
52 )
53
54 ELSEIF("${TIZEN_PROFILE_NAME}" STREQUAL "MOBILE")
55
56 INCLUDE_DIRECTORIES(
57         ${CMAKE_SOURCE_DIR}/include
58         ${CMAKE_SOURCE_DIR}/include/mobile
59 )
60 INCLUDE(FindPkgConfig)
61 pkg_check_modules(pkgs REQUIRED
62         aul
63         capi-system-media-key
64         db-util
65         dlog
66         ecore
67         ecore-wayland
68         ecore-evas
69         ecore-input
70         edbus
71         eina
72         elementary
73         evas
74         syspopup-caller
75         vconf
76         appcore-efl
77         glib-2.0
78         ui-gadget-1
79         bundle
80         capi-appfw-application
81         capi-appfw-app-manager
82         capi-network-bluetooth
83         capi-system-system-settings
84         feedback
85         alarm-service
86         pkgmgr-info
87         deviced
88         edbus
89         dbus-1
90         dbus-glib-1
91         tts
92         capi-message-port
93         efl-extension
94 )
95
96 ELSEIF("${TIZEN_PROFILE_NAME}" STREQUAL "WEARABLE")
97
98 INCLUDE_DIRECTORIES(
99         ${CMAKE_SOURCE_DIR}/include
100         ${CMAKE_SOURCE_DIR}/include/wearable
101 )
102 INCLUDE(FindPkgConfig)
103 pkg_check_modules(pkgs REQUIRED
104         aul
105         capi-system-media-key
106         db-util
107         dlog
108         ecore
109         ecore-evas
110         ecore-input
111         ecore-wayland
112         edbus
113         eina
114         elementary
115         evas
116         syspopup-caller
117         vconf
118         appcore-efl
119         glib-2.0
120         ui-gadget-1
121         bundle
122         capi-appfw-application
123         capi-appfw-app-manager
124         capi-network-bluetooth
125         feedback
126         alarm-service
127         pkgmgr-info
128         deviced
129         edbus
130         dbus-1
131         dbus-glib-1
132 )
133
134 ELSEIF("${TIZEN_PROFILE_NAME}" STREQUAL "IVI")
135
136 INCLUDE_DIRECTORIES(
137         ${CMAKE_SOURCE_DIR}/include
138         ${CMAKE_SOURCE_DIR}/include/ivi
139 )
140 INCLUDE(FindPkgConfig)
141 pkg_check_modules(pkgs REQUIRED
142         aul
143         capi-system-media-key
144         db-util
145         dlog
146         ecore
147         ecore-wayland
148         ecore-evas
149         ecore-input
150         edbus
151         eina
152         elementary
153         evas
154         syspopup-caller
155         vconf
156         appcore-efl
157         glib-2.0
158         ui-gadget-1
159         bundle
160         capi-appfw-application
161         capi-appfw-app-manager
162         capi-network-bluetooth
163         capi-system-system-settings
164         feedback
165         alarm-service
166         pkgmgr-info
167         deviced
168         edbus
169         dbus-1
170         dbus-glib-1
171         tts
172         capi-message-port
173         efl-extension
174 )
175
176 ENDIF()
177
178 IF(X11_SUPPORT)
179 pkg_check_modules(pkgs REQUIRED
180         ecore-x
181         utilX
182         )
183 ENDIF(X11_SUPPORT)
184
185 FOREACH(flag ${pkgs_CFLAGS})
186         SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
187 ENDFOREACH(flag)
188
189 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wall -fPIE")
190 SET(CMAKE_C_FLAGS_PROFILING    "-O0 -g -pg -fPIE")
191 SET(CMAKE_CXX_FLAGS_PROFILING  "-O0 -std=c++0x -g -pg -fPIE")
192 SET(CMAKE_C_FLAGS_DEBUG        "-O0 -g -fPIE")
193 SET(CMAKE_CXX_FLAGS_DEBUG      "-O0 -std=c++0x -g -fPIE")
194 SET(CMAKE_C_FLAGS_RELEASE      "-O2 -g -fPIE")
195 SET(CMAKE_CXX_FLAGS_RELEASE    "-O2 -std=c++0x -g -fPIE")
196 SET(CMAKE_C_FLAGS_CCOV         "-O2 -g --coverage -fPIE")
197 SET(CMAKE_CXX_FLAGS_CCOV       "-O2 -std=c++0x -g --coverage -fPIE")
198
199 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=${PREFIX}/lib -pie")
200
201 FIND_PROGRAM(UNAME NAMES uname)
202 EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
203 IF("${ARCH}" STREQUAL "arm")
204         ADD_DEFINITIONS("-DTARGET")
205         MESSAGE("add -DTARGET")
206 ENDIF("${ARCH}" STREQUAL "arm")
207
208 ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
209 ADD_DEFINITIONS("-DPACKAGE_NAME=\"${PKGNAME}\"")
210 ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
211 ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
212 ADD_DEFINITIONS("-D_GNU_SOURCE")
213
214 IF(X11_SUPPORT)
215         ADD_DEFINITIONS("-DHAVE_X11")
216 ENDIF(X11_SUPPORT)
217
218 IF(WAYLAND_SUPPORT)
219         ADD_DEFINITIONS("-DHAVE_WAYLAND")
220 ENDIF(WAYLAND_SUPPORT)
221
222 IF("${TIZEN_PROFILE_NAME}" STREQUAL "COMMON")
223
224 SET(BUILD_SOURCE
225         src/dbus_util.c
226         src/package_mgr.c
227         src/process_mgr.c
228         src/status.c
229
230         src/common/home_mgr.c
231         src/common/lock_mgr.c
232         src/common/starter.c
233         src/common/window_mgr.c
234         src/common/popup.c
235         src/common/hw_key.c
236 )
237
238 ELSEIF("${TIZEN_PROFILE_NAME}" STREQUAL "MOBILE")
239
240 SET(BUILD_SOURCE
241         src/dbus_util.c
242         src/package_mgr.c
243         src/process_mgr.c
244         src/status.c
245
246         src/mobile/home_mgr.c
247         src/mobile/lock_mgr.c
248         src/mobile/starter.c
249         src/mobile/window_mgr.c
250         src/mobile/popup.c
251         src/mobile/hw_key.c
252 )
253
254 ELSEIF("${TIZEN_PROFILE_NAME}" STREQUAL "WEARABLE")
255
256 SET(BUILD_SOURCE
257         src/dbus_util.c
258         src/package_mgr.c
259         src/process_mgr.c
260         src/status.c
261
262         src/wearable/clock_mgr.c
263         src/wearable/home_mgr.c
264         src/wearable/hourly_alert.c
265         src/wearable/hw_key.c
266         src/wearable/starter.c
267 )
268
269 ELSEIF("${TIZEN_PROFILE_NAME}" STREQUAL "IVI")
270
271 SET(BUILD_SOURCE
272         src/dbus_util.c
273         src/package_mgr.c
274         src/process_mgr.c
275         src/status.c
276
277         src/ivi/home_mgr.c
278         src/ivi/lock_mgr.c
279         src/ivi/starter.c
280         src/ivi/window_mgr.c
281         src/ivi/popup.c
282         src/ivi/hw_key.c
283 )
284
285 ENDIF()
286
287 ADD_EXECUTABLE(${PROJECT_NAME} ${BUILD_SOURCE})
288 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
289 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})
290 INSTALL(DIRECTORY DESTINATION ${DATADIR})
291
292 INSTALL(FILES ${CMAKE_SOURCE_DIR}/rd4starter DESTINATION /etc/init.d
293                 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
294                 GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
295 INSTALL(FILES ${CMAKE_SOURCE_DIR}/rd3starter DESTINATION /etc/init.d
296                 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
297                 GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
298 #INSTALL to /etc/init.d
299
300 ADD_SUBDIRECTORY(po)