blob: 3c2532b1b82934011255c1c786047ba95c4f56b3 (
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
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(crash-popup C)
SET(SRCS
src/crash-popup.c
)
SET(VENDOR "tizen")
SET(PACKAGE ${PROJECT_NAME})
SET(PKGNAME "org.${VENDOR}.${PACKAGE}")
SET(EXENAME "crash-popup")
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(BINDIR "${PREFIX}/apps/${PKGNAME}/bin")
SET(RESDIR "${PREFIX}/apps/${PKGNAME}/res")
SET(DATADIR "${PREFIX}/data")
SET(LOCALEDIR "${RESDIR}/locale")
SET(ICONDIR "${PREFIX}/share/icons/default/small")
SET(IMAGEDIR "${RESDIR}/images/${PACKAGE}")
SET(EDJDIR "${RESDIR}/edje")
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}/src)
INCLUDE(FindPkgConfig)
pkg_check_modules(pkgs REQUIRED
appcore-efl
elementary
ecore-file
ecore-input
ecore-x
ecore
evas
edje
vconf
utilX
ecore-imf
appcore-common
ecore-imf
)
FOREACH(flag ${pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
SET(CMAKE_C_FLAGS_RELEASE "-O2")
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("-DRESDIR=\"${RESDIR}\"")
ADD_DEFINITIONS("-DDATADIR=\"${DATADIR}\"")
ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
ADD_DEFINITIONS("-DICONDIR=\"${ICONDIR}\"")
ADD_DEFINITIONS("-DIMAGEDIR=\"${IMAGEDIR}\"")
ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"")
#SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed")
ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
# install edj
ADD_CUSTOM_TARGET(crash-popup.edj
COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/../images
${CMAKE_SOURCE_DIR}/edcs/crash-popup.edc ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/crash-popup.edj
DEPENDS ${CMAKE_SOURCE_DIR}/edcs/crash-popup.edc
)
ADD_DEPENDENCIES(${PROJECT_NAME} crash-popup.edj)
INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/crash-popup.edj DESTINATION ${EDJDIR})
# install images
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/images/public/ DESTINATION ${IMAGEDIR} FILES_MATCHING PATTERN "*.png")
INSTALL(TARGETS ${EXENAME} DESTINATION ${BINDIR})
# install xml file & icon
INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/${PKGNAME}.xml DESTINATION ${PREFIX}/share/packages)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/${PKGNAME}.png DESTINATION ${ICONDIR})
# install SMACK rule file
INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.crash-popup.rule DESTINATION /etc/smack/accesses2.d)
# i18n
ADD_SUBDIRECTORY(popup_po)
|