blob: 9d058ff43de4d60a0dcdedbfdf329700501f419e (
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
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(contacts-service C)
#IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
# SET(CMAKE_BUILD_TYPE "Release")
#ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
#MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
SET(DEST_INCLUDE_DIR "include/contacts-svc")
SET(SRC_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/include")
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(EXEC_PREFIX "\${prefix}")
SET(INCLUDEDIR "\${prefix}/${DEST_INCLUDE_DIR}")
SET(VERSION_MAJOR 0)
SET(VERSION "${VERSION_MAJOR}.9.109.1")
EXECUTE_PROCESS(COMMAND build-util/generator.sh)
SET(PC_REQUIRED "capi-base-common")
#INCLUDE_DIRECTORIES(${SRC_INCLUDE_DIR})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -I${SRC_INCLUDE_DIR}")
INCLUDE(FindPkgConfig)
pkg_check_modules(pkgs REQUIRED glib-2.0 capi-base-common vconf dlog db-util icu-i18n)
FOREACH(flag ${pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC")
#SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
#SET(CMAKE_C_FLAGS_RELEASE "-mabi=aapcs-linux -march=armv7-a -msoft-float -O2")
ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
# Install notification files
FILE(GLOB NOTI_FILES ${CMAKE_SOURCE_DIR}/res/.CONTACTS_SVC_*)
INSTALL(FILES ${NOTI_FILES} DESTINATION /opt/usr/data/contacts-svc
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_WRITE GROUP_READ)
# Install directory for image
INSTALL(DIRECTORY DESTINATION /opt/usr/data/contacts-svc/img/vcard)
INSTALL(DIRECTORY DESTINATION /opt/usr/data/contacts-svc/img/my)
INSTALL(DIRECTORY DESTINATION /opt/usr/data/contacts-svc/img/group)
INSTALL(DIRECTORY DESTINATION /opt/usr/data/contacts-svc/img/logo)
# Install header file
FILE(GLOB HEADER_FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/*.h)
INSTALL(FILES ${HEADER_FILES} DESTINATION ${DEST_INCLUDE_DIR})
# Install DB file
FILE(GLOB DB_FILES ${CMAKE_CURRENT_SOURCE_DIR}/build-util/.contacts-svc.db*)
INSTALL(FILES ${DB_FILES} DESTINATION /opt/usr/dbspace)
#Install SMACK rule file
INSTALL(FILES ${CMAKE_SOURCE_DIR}/contacts-service2.rule DESTINATION /opt/etc/smack/accesses.d)
ADD_SUBDIRECTORY(client)
ADD_SUBDIRECTORY(server)
|