blob: ca46d759140a4d9c5a2430da068ad752cdb2e3e5 (
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
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(bt-connection-popup C)
SET(SRCS
src/bt-connection-main.c
src/bt-connection-view.c
src/bt-connection-handler.c
src/bt-connection-ipc.c
)
SET(VENDOR "samsung")
SET(PACKAGE ${PROJECT_NAME})
SET(PKGNAME "com.${VENDOR}.${PACKAGE}")
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(INSTALL_DIR_APPS "/usr/apps/${PKGNAME}")
SET(INSTALL_DIR_PRE "/usr")
SET(BINDIR "${PREFIX}/bin")
SET(RESDIR "${PREFIX}/res")
SET(DATADIR "${PREFIX}/data")
SET(ICONDIR "${RESDIR}/icons")
SET(LOCALEDIR "${RESDIR}/locale")
SET(DESKTOPICONDIR "${ICONDIR}/default/small")
SET(EDJDIR "${RESDIR}/edje")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
SET(GC_SECTIONS_FLAGS "-fdata-sections -ffunction-sections -Wl,--gc-sections")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GC_SECTIONS_FLAGS}")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GC_SECTIONS_FLAGS}")
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
IF(FEATURE_TIZENW)
ADD_DEFINITIONS("-DFEATURE_TIZENW")
ENDIF(FEATURE_TIZENW)
INCLUDE(FindPkgConfig)
pkg_check_modules(pkgs REQUIRED elementary
dlog evas edje vconf
ecore-x ecore ecore-input capi-appfw-application
efl-assist appcore-efl
capi-network-bluetooth
dbus-glib-1 edbus
)
FIND_LIBRARY(LIB_M m)
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("-DICONDIR=\"${ICONDIR}\"")
ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"")
ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} "-pie" ${LIB_M})
ADD_CUSTOM_TARGET(${PROJECT_NAME}.edj
COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/images
${CMAKE_SOURCE_DIR}/edc/${PROJECT_NAME}.edc ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.edj
DEPENDS ${CMAKE_SOURCE_DIR}/edc/${PROJECT_NAME}.edc
)
ADD_DEPENDENCIES(${PROJECT_NAME} ${PROJECT_NAME}.edj)
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})
INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.edj DESTINATION ${EDJDIR})
# install application HOME directory
INSTALL(DIRECTORY DESTINATION ${DATADIR})
# desktop icon
#INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.bt-connection-popup.png DESTINATION /usr/share/icons/default/small)
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.bt-connection-popup.xml DESTINATION /usr/share/packages)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.bt-connection-popup.rule DESTINATION /etc/smack/accesses2.d/)
ADD_SUBDIRECTORY(po)
|