blob: 677f8afe1954ad9a0da75f1be6436e20c91459fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(sat-ui C)
SET(SRCS
src/sat-ui.c
src/sat-ui-icon.c
src/setup-menu-view.c
src/select-item-view.c
src/display-text-view.c
src/get-input-view.c
src/get-inkey-view.c
src/tel-request.c
src/winset.c
)
IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
SET(CMAKE_BUILD_TYPE "Release")
ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
SET(PKG_NAME org.tizen.sat-ui)
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(BINDIR "${PREFIX}/bin")
SET(RESDIR "${PREFIX}/res")
SET(DATADIR "${PREFIX}/data")
SET(LOCALEDIR "${RESDIR}/locale")
SET(ICONDIR "${RESDIR}/icons/default/small")
SET(EDJDIR "${RESDIR}/edje")
SET(IMGDIR "${RESDIR}/images")
SET(MEDIADIR "${RESDIR}/media")
INCLUDE(FindPkgConfig)
pkg_check_modules(pkgs REQUIRED
appcore-efl
tapi
elementary
mm-sound
aul
vconf
glib-2.0
gio-2.0
gobject-2.0
libprivilege-control
ecore-imf
ecore-x
evas
ecore
edje
ecore-input
eina
sysman
notification
rua
)
FOREACH(flag ${pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)
#SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -finstrument-functions")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
SET(CMAKE_C_FLAGS_DEBUG "")
SET(CMAKE_C_FLAGS_RELEASE "")
FIND_PROGRAM(UNAME NAMES uname)
EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
IF("${ARCH}" STREQUAL "arm")
ADD_DEFINITIONS("-DTARGET")
MESSAGE("add -DTARGET")
ENDIF("${ARCH}" STREQUAL "arm")
ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
ADD_DEFINITIONS("-DSLP_DEBUG")
ADD_DEFINITIONS("-DLARGE_ICON")
#ADD_DEFINITIONS("-DSLP_SYSLOG_OUT")
#SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
ADD_CUSTOM_TARGET(sat-ui.edj
COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/data/image
${CMAKE_SOURCE_DIR}/data/sat-ui.edc ${CMAKE_BINARY_DIR}/sat-ui.edj
DEPENDS ${CMAKE_SOURCE_DIR}/data/sat-ui.edc
)
ADD_DEPENDENCIES(${PROJECT_NAME} sat-ui.edj)
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})
INSTALL(FILES ${CMAKE_BINARY_DIR}/sat-ui.edj DESTINATION ${PREFIX}/res/edje)
# install desktop file & icon
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
#CONFIGURE_FILE(${PROJECT_NAME}.desktop.in ${PROJECT_NAME}.desktop)
#INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.desktop DESTINATION share/install-info/application/)
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/data/sound/ DESTINATION ${MEDIADIR} FILES_MATCHING PATTERN "*.wav")
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/data/image/ DESTINATION ${IMGDIR} FILES_MATCHING PATTERN "*.png")
#INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/data/theme/ DESTINATION ${IMGDIR} FILES_MATCHING PATTERN "*.png")
INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/image/${PKG_NAME}.png DESTINATION /usr/share/icons/default/small)
# In security reason, supress the dbus auto activation
INSTALL(FILES ${CMAKE_BINARY_DIR}/data/${PKG_NAME}.service DESTINATION /usr/share/dbus-1/services)
# install application HOME directory
INSTALL(DIRECTORY DESTINATION ${DATADIR})
# install SMACK rule file
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${PKG_NAME}.rule DESTINATION /etc/smack/accesses.d)
# i18n
ADD_SUBDIRECTORY(po)
#Idle_screen
ADD_SUBDIRECTORY(sat-event-downloader)
|