summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: 67d6e27650263864599fac468e3f3e0fb6d92abf (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
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

MESSAGE("PROJECT : ${PKG_NAME}")

# DEFINES

SET(VERSION ${PKG_VERSION}-${PKG_RELEASE})
MESSAGE("VERSION : ${VERSION}")

IF(DEFINED SUPPORT_WIFI_DIRECT)
	MESSAGE("SUPPORT_WIFI_DIRECT: ${SUPPORT_WIFI_DIRECT}")
	IF(SUPPORT_WIFI_DIRECT)
		ADD_DEFINITIONS(-DSUPPORT_WIFI_DIRECT)
	ENDIF(SUPPORT_WIFI_DIRECT)
ENDIF(DEFINED SUPPORT_WIFI_DIRECT)

IF(DEFINED SUPPORT_LOG_MESSAGE)
	MESSAGE("SUPPORT_LOG_MESSAGE: ${SUPPORT_LOG_MESSAGE}")
	IF(SUPPORT_LOG_MESSAGE)
		ADD_DEFINITIONS(-DSUPPORT_LOG_MESSAGE)
	ENDIF(SUPPORT_LOG_MESSAGE)
ENDIF(DEFINED SUPPORT_LOG_MESSAGE)

IF(DEFINED IPC_SOCKET)
	ADD_DEFINITIONS(-DIPC_SOCKET=\"${IPC_SOCKET}\")
ENDIF(DEFINED IPC_SOCKET)

IF(DEFINED NOTIFY_DIR)
	ADD_DEFINITIONS(-DNOTIFY_DIR=\"${NOTIFY_DIR}\")
ENDIF(DEFINED NOTIFY_DIR)

IF(DEFINED LOCALE_DIR)
	ADD_DEFINITIONS(-DLOCALE_DIR=\"${LOCALE_DIR}\")
ENDIF(DEFINED LOCALE_DIR)

IF(DEFINED SUPPORT_SECURITY_PRIVILEGE)
	MESSAGE("SUPPORT_SECURITY_PRIVILEGE: ${SUPPORT_SECURITY_PRIVILEGE}")
	IF(SUPPORT_SECURITY_PRIVILEGE)
		ADD_DEFINITIONS(-DSUPPORT_SECURITY_PRIVILEGE)
	ENDIF(SUPPORT_SECURITY_PRIVILEGE)
ENDIF(DEFINED SUPPORT_SECURITY_PRIVILEGE)

IF(DEFINED SUPPORT_COMPANION_MODE)
	MESSAGE("SUPPORT_COMPANION_MODE: ${SUPPORT_COMPANION_MODE}")
	IF(SUPPORT_COMPANION_MODE)
		ADD_DEFINITIONS(-DSUPPORT_COMPANION_MODE)
	ENDIF(SUPPORT_COMPANION_MODE)
ENDIF(DEFINED SUPPORT_COMPANION_MODE)

IF (TIZEN_2_3_UX)
	MESSAGE("TIZEN_2_3_UX:On")
	ADD_DEFINITIONS("-D_TIZEN_2_3_UX")
ENDIF(TIZEN_2_3_UX)

# BUILD

ADD_SUBDIRECTORY(agent)
ADD_SUBDIRECTORY(provider-interface)
ADD_SUBDIRECTORY(provider)
# i18n
IF(TIZEN_2_3_UX)
ADD_SUBDIRECTORY(po/tizen2.3)
ELSE(TIZEN_2_3_UX)
ADD_SUBDIRECTORY(po/redwood)
ENDIF(TIZEN_2_3_UX)

# INSTALL

PROJECT(${PKG_NAME} C)
SET(PACKAGE_DESCRIPTION "Defines for ${PROJECT_NAME}")

CONFIGURE_FILE(download-provider.pc.in download-provider.pc @ONLY)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/download-provider.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)

INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/systemd/download-provider.service DESTINATION /usr/lib/systemd/system)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/systemd/download-provider.socket DESTINATION /usr/lib/systemd/system)

# install images
IF(TIZEN_2_3_UX)
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res/images/tizen2.3/ DESTINATION ${IMAGE_DIR})
ELSE(TIZEN_2_3_UX)
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res/images/redwood/ DESTINATION ${IMAGE_DIR})
ENDIF(TIZEN_2_3_UX)

IF(DEFINED LICENSE_DIR)
	CONFIGURE_FILE(LICENSE.APLv2 share/license/${PROJECT_NAME})
	INSTALL(FILES share/license/${PROJECT_NAME} DESTINATION ${LICENSE_DIR})
ENDIF(DEFINED LICENSE_DIR)

INSTALL(FILES ${CMAKE_SOURCE_DIR}/dump-download-provider.sh DESTINATION ${CMAKE_LOG_DUMP_SCRIPT_DIR})