blob: 441dbc8057b54c5dfef2d6a5aa805ec4e9909aeb (
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(watch-setting C)
SET(SRCS
src/setting.c
src/setting-sound.c
src/setting-vibration.c
src/setting-connection.c
src/setting-clock.c
src/setting-volume-page.c
src/setting-info.c
src/setting-device.c
src/setting-display.c
src/setting-language.c
src/setting-common-sound.c
src/util.c
src/setting_data_vconf.c
src/setting_view_toast.c
src/setting-datausage.c
src/setting-mobile-networks.c
)
SET(VENDOR "samsung")
SET(PACKAGE ${PROJECT_NAME})
SET(PKGNAME "com.${VENDOR}.${PACKAGE}")
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
#SET(INSTALL_DIR_APPS "${TZ_SYS_RO_APP}/${PKGNAME}")
SET(INSTALL_DIR_PRE "/usr")
SET(BINDIR "${PREFIX}/bin")
SET(RESDIR "${PREFIX}/res")
SET(DATADIR "${PREFIX}/data")
SET(LOCALEDIR "${RESDIR}/locale")
SET(ICONDIR "${RESDIR}/icons")
SET(DESKTOPICONDIR "${ICONDIR}/default/small")
SET(EDJ_PATH "${RESDIR}/edje")
#SET(EDJ_PATH ".")
SET(IMGDIR "./data/images")
SET(FAKE_IMG_PATH "${TZ_SYS_RO_APP}/${PKGNAME}/shared/res")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Werror=pointer-to-int-cast -Werror=int-to-pointer-cast")
IF(FEATURE_EMUL)
SET(FEATURE_SETTING_EMUL "1")
MESSAGE("emul build!!!!!!!!!")
ELSE(FEATURE_EMUL)
SET(FEATURE_SETTING_EMUL "0")
MESSAGE("target build!!!!!!!!!")
ENDIF(FEATURE_EMUL)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/config.h.in ${CMAKE_SOURCE_DIR}/include/watch_setting_config.h)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
INCLUDE(FindPkgConfig)
pkg_check_modules(pkgs REQUIRED elementary ecore-imf appcore-common appcore-efl
dlog glib-2.0 evas eina edje vconf elementary sensor
ecore ecore-input ecore-evas capi-appfw-application
pkgmgr pkgmgr-info fontconfig
feedback json-glib-1.0 deviced capi-network-bluetooth bluetooth-api
capi-system-device capi-media-sound-manager capi-media-player mm-player mm-sound
capi-system-system-settings capi-system-info libxml-2.0 capi-media-wav-player
#capability-manager
capi-content-media-content aul
capi-appfw-app-manager
alarm-service
libtzplatform-config
efl-extension
capi-network-wifi-manager
capi-network-nfc
capi-telephony
storage
capi-base-utils-i18n
tapi
watch-control
capi-location-manager
capi-network-stc
)
FIND_LIBRARY(LIB_M m)
#Icon - app
INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.watch-setting.png DESTINATION ${ICONDIR})
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/images/ DESTINATION ${TZ_SYS_RO_APP}/org.tizen.watch-setting/res/images FILES_MATCHING PATTERN "*")
# install media-data
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/media-data-sdk/settings/ DESTINATION ${TZ_SYS_GLOBALUSER_DATA}/settings PATTERN "*")
# install langlist xml file
IF(FEATURE_EMUL)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/langlist_emul.xml DESTINATION ${DATADIR} RENAME langlist.xml)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/langlist_emul.xml DESTINATION ${TZ_SYS_GLOBALUSER_DATA}/setting RENAME langlist.xml)
ELSE(FEATURE_EMUL)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/langlist.xml DESTINATION ${DATADIR})
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/langlist.xml DESTINATION ${TZ_SYS_GLOBALUSER_DATA}/setting)
ENDIF(FEATURE_EMUL)
# install clocklist xml file
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/clocklist.xml DESTINATION ${DATADIR})
# install media-data
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/fake-img/ DESTINATION ${FAKE_IMG_PATH} FILES_MATCHING PATTERN "*.png")
# install Safety.zip
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/Safety.zip DESTINATION /usr/share)
ADD_DEFINITIONS(${pkgs_CFLAGS})
ADD_DEFINITIONS("-fpie")
ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
ADD_DEFINITIONS("-DFACTORYFS=\"$ENV{FACTORYFS}\"")
ADD_DEFINITIONS("-DSLP_DEBUG")
ADD_DEFINITIONS("-DSLP_PROF")
ADD_DEFINITIONS("-DVENDOR=\"${VENDOR}\"")
ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
ADD_DEFINITIONS("-DPACKAGE_NAME=\"${PKGNAME}\"")
ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
ADD_DEFINITIONS("-DINSTALL_DIR_APPS=\"${INSTALL_DIR_APPS}\"")
ADD_DEFINITIONS("-DBINDIR=\"${BINDIR}\"")
ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
ADD_DEFINITIONS("-DICON_DIR=\"${ICONDIR}\"")
ADD_DEFINITIONS("-DELM_DEMO_EDJ=\"${EDJ_PATH}/${PROJECT_NAME}.edj\"")
ADD_DEFINITIONS("-DTZ_SYS_RO_APP_D=\"${TZ_SYS_RO_APP}\"")
ADD_DEFINITIONS("-DTZ_SYS_DATA_D=\"${TZ_SYS_DATA}\"")
ADD_DEFINITIONS("-DTZ_SYS_ETC_D=\"${TZ_SYS_ETC}\"")
ADD_DEFINITIONS("-DTZ_SYS_SHARE_D=\"${TZ_SYS_SHARE}\"")
ADD_DEFINITIONS("-DTZ_SYS_GLOBALUSER_DATA_D=\"${TZ_SYS_GLOBALUSER_DATA}\"")
ADD_DEFINITIONS("-DTZ_USER_CONTENT_D=\"${TZ_USER_CONTENT}\"")
ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} "-pie" ${LIB_M})
#edj compile
ADD_CUSTOM_TARGET(${PROJECT_NAME}.edj
COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/data/groups/images #data/images
${CMAKE_SOURCE_DIR}/data/${PROJECT_NAME}.edc ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.edj
DEPENDS ${CMAKE_SOURCE_DIR}/data/${PROJECT_NAME}.edc
)
ADD_DEPENDENCIES(${PROJECT_NAME} ${PROJECT_NAME}.edj)
ADD_DEPENDENCIES(${PROJECT_NAME} edj_build)
MESSAGE("bindir: ${BINDIR}")
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION
${BINDIR})
INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.edj DESTINATION ${EDJ_PATH})
# install application HOME directory
INSTALL(DIRECTORY DESTINATION ${DATADIR})
# desktop icon
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/org.tizen.watch-setting.xml.in ${CMAKE_SOURCE_DIR}/org.tizen.watch-setting.xml)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.watch-setting.xml DESTINATION /usr/share/packages)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.watch-setting.png DESTINATION /usr/share/icons/default/small)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.watch-setting_small.png DESTINATION /usr/share/icons/default/small)
ADD_SUBDIRECTORY(po)
|