summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: f8123dccc510991e343b190c8a6648072867840c (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
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(phone C)

SET(VENDOR "samsung")
SET(PACKAGE ${PROJECT_NAME})
SET(PKGNAME "com.${VENDOR}.${PACKAGE}")
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(BINDIR "${PREFIX}/bin")
SET(RESDIR "${PREFIX}/res")
SET(DATADIR "${PREFIX}/data")
SET(LOCALEDIR "/usr/ug/res/locale")
SET(EDC_SRC_DIR "${CMAKE_SOURCE_DIR}/lib/edc")
SET(EDJDIR "/usr/ug/res/edje/ug-${PACKAGE}")
SET(IMGDIR "/usr/ug/res/images/ug-${PACKAGE}")
SET(VERSION_MAJOR 0)
SET(VERSION "${VERSION_MAJOR}.4.37")

SET(CMAKE_SKIP_BUILD_RPATH FALSE)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
SET(CMAKE_INSTALL_RPATH "/usr/ug/lib")
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)

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)

INCLUDE(FindPkgConfig)
pkg_check_modules(pkgs REQUIRED appcore-efl ui-gadget-1 contacts-service ecore-x evas ecore ecore-input edje eina syspopup-caller capi-appfw-application capi-system-runtime-info capi-system-info)

FOREACH(flag ${pkgs_CFLAGS})
	SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)

SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
SET(CMAKE_C_FLAGS_DEBUG "")
SET(CMAKE_C_FLAGS_RELEASE "")

SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--hash-style=both -Wl,--as-needed")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--hash-style=both -Wl,--as-needed")

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("-DVENDOR=\"${VENDOR}\"")
ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
ADD_DEFINITIONS("-DPACKAGE_NAME=\"${PKGNAME}\"")
ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"")
ADD_DEFINITIONS("-DIMGDIR=\"${IMGDIR}\"")
ADD_DEFINITIONS("-DUGDATADIR=\"${UGDATADIR}\"")

INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/lib/images/phoneug_images/ DESTINATION ${IMGDIR})
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/lib/images/contact_images/ DESTINATION ${IMGDIR})
INSTALL(DIRECTORY DESTINATION ${DATADIR})

ADD_SUBDIRECTORY(lib)
ADD_SUBDIRECTORY(phone)
ADD_SUBDIRECTORY(contacts)
ADD_SUBDIRECTORY(viewer)

# i18n
ADD_SUBDIRECTORY(po)