blob: 93e6ec14500cf4a3991b80ec12d89dfb5d280f76 (
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
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(accessibility-setting C)
SET(HEADERS)
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(EXEC_PREFIX "\${prefix}")
SET(INCLUDEDIR "\${prefix}/include")
SET(VERSION 1.0)
SET(PACKAGE ${PROJECT_NAME})
SET(PKGNAME "org.tizen.${PACKAGE}")
SET(PKGDIR "${TZ_SYS_RO_APP}/${PKGNAME}")
SET(BINDIR "${PKGDIR}/bin")
SET(RESDIR "${PKGDIR}/res")
SET(EDJDIR "${RESDIR}/edje")
SET(ICONDIR "${TZ_SYS_RO_ICONS}/default/small")
SET(LOCALEDIR "${RESDIR}/locale")
INCLUDE(FindPkgConfig)
pkg_check_modules(pkgs REQUIRED
capi-appfw-application appcore-efl elementary
efl-extension dlog vconf
)
FOREACH(flag ${pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}")
ENDFOREACH(flag)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wall -fPIE")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS} -Wall -fPIE")
SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -Wall -fPIE")
SET(CMAKE_C_FLAGS_RELEASE "-O2 -Wall -fPIE")
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -fPIE")
SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -g -fPIE")
ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
ADD_DEFINITIONS("-DPACKAGE_NAME=\"${PKGNAME}\"")
ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"")
ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
ADD_DEFINITIONS("-DTZ_SYS_RO_APP_D=\"${TZ_SYS_RO_APP}\"")
SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
SET(SRCS
src/setting-accessibility.c
src/setting-accessibility-menu.c
src/setting-accessibility-vision.c
)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
SET(dependents "elementary efl-extension dlog vconf capi-appfw-application appcore-efl ")
INCLUDE(FindPkgConfig)
pkg_check_modules(pkgs REQUIRED
${dependents}
)
FOREACH(flag ${pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIE -Wl,-rpath,${LIBDIR}")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} "-pie")
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})
ADD_CUSTOM_TARGET(${PROJECT_NAME}.edj
COMMAND edje_cc
${CMAKE_SOURCE_DIR}/data/edc/${PROJECT_NAME}.edc ${PROJECT_NAME}.edj
DEPENDS ${CMAKE_SOURCE_DIR}/data/edc/${PROJECT_NAME}.edc
)
ADD_DEPENDENCIES(${PROJECT_NAME} ${PROJECT_NAME}.edj)
INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.edj DESTINATION ${EDJDIR})
INSTALL(FILES ${CMAKE_SOURCE_DIR}/${PKGNAME}.xml DESTINATION ${TZ_SYS_RO_PACKAGES})
# i18n
ADD_SUBDIRECTORY(po)
|