Set the vconfkey as the default menu-screen/lock-screen when the app is not launched...
[apps/native/starter.git] / CMakeLists.txt
1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2 PROJECT(starter C)
3
4 SET(VENDOR "tizen")
5 SET(PACKAGE ${PROJECT_NAME})
6 SET(PKGNAME "org.${VENDOR}.${PACKAGE}")
7 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
8 SET(BINDIR "${PREFIX}/bin")
9 SET(DATADIR "${PREFIX}/share")
10 SET(LOCALEDIR "${DATADIR}/locale")
11
12 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
13
14 INCLUDE(FindPkgConfig)
15 pkg_check_modules(pkgs REQUIRED
16         ail
17         aul
18         capi-system-media-key
19         db-util
20         dlog
21         ecore
22         ecore-evas
23         ecore-input
24         ecore-x
25         eet
26         eina
27         elementary
28         evas
29         heynoti
30         sysman
31         syspopup-caller
32         utilX
33         vconf
34         x11
35         xcomposite
36         xext
37         appcore-efl
38         glib-2.0
39         ui-gadget-1
40         bundle
41         capi-appfw-application
42         capi-system-info
43         pkgmgr-info
44 )
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} -Wall")
51 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
52 SET(CMAKE_C_FLAGS_RELEASE "-O2")
53
54 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=${PREFIX}/lib -pie")
55
56 FIND_PROGRAM(UNAME NAMES uname)
57 EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
58 IF("${ARCH}" STREQUAL "arm")
59         ADD_DEFINITIONS("-DTARGET")
60         MESSAGE("add -DTARGET")
61 ENDIF("${ARCH}" STREQUAL "arm")
62
63 ADD_DEFINITIONS("-DVENDOR=\"${VENDOR}\"")
64 ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
65 ADD_DEFINITIONS("-DPACKAGE_NAME=\"${PKGNAME}\"")
66 ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
67 ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
68 ADD_DEFINITIONS("-D_GNU_SOURCE")
69
70 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
71
72 ADD_EXECUTABLE(${PROJECT_NAME}
73         src/hw_key.c
74         src/pkg_event.c
75         src/menu_daemon.c
76         src/starter.c
77         src/x11.c
78         src/xmonitor.c
79         src/lock-daemon.c
80         src/lockd-debug.c
81         src/lockd-process-mgr.c
82         src/lockd-window-mgr.c
83 )
84 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
85 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})
86
87 SET(LOCK_SETTING lock-setting)
88
89 ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${LOCK_SETTING})
90
91 # install desktop file & icon
92 #CONFIGURE_FILE(${PROJECT_NAME}.desktop.in ${PROJECT_NAME}.desktop)
93 #INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.desktop DESTINATION share/applications)
94
95 INSTALL(FILES ${CMAKE_SOURCE_DIR}/rd4starter DESTINATION /etc/init.d
96                 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
97                 GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
98 INSTALL(FILES ${CMAKE_SOURCE_DIR}/rd3starter DESTINATION /etc/init.d
99                 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
100                 GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
101 #INSTALL to /etc/init.d