1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2 PROJECT(accessibility-setting CXX)
5 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
6 SET(EXEC_PREFIX "\${prefix}")
7 SET(INCLUDEDIR "\${prefix}/include")
10 SET(PACKAGE ${PROJECT_NAME})
11 SET(PKGNAME "org.tizen.${PACKAGE}")
12 SET(PKGDIR "${TZ_SYS_RO_APP}/${PKGNAME}")
13 SET(BINDIR "${PKGDIR}/bin")
14 SET(RESDIR "${PKGDIR}/res")
15 SET(EDJDIR "${RESDIR}/edje")
16 SET(ICONDIR "${TZ_SYS_RO_ICONS}/default/small")
17 SET(LOCALEDIR "${RESDIR}/locale")
19 INCLUDE(FindPkgConfig)
21 pkg_check_modules(pkgs REQUIRED
22 capi-appfw-application
30 capi-system-system-settings
37 FOREACH(flag ${pkgs_CFLAGS})
38 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
39 SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}")
42 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS} -fdiagnostics-color=always -fPIE -std=c++17 -Wall")
43 SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -fPIE")
44 SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -g -fPIE")
46 ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
47 ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
48 ADD_DEFINITIONS("-DPACKAGE_NAME=\"${PKGNAME}\"")
49 ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"")
50 ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"")
51 ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
52 ADD_DEFINITIONS("-DTZ_SYS_RO_APP_D=\"${TZ_SYS_RO_APP}\"")
53 ADD_DEFINITIONS("-D_TZ_SYS_DATA=\"${TZ_SYS_DATA}\"")
54 ADD_DEFINITIONS("-DDEBUG_PRINTING_LEVEL=DEBUG_PRINTING_LEVEL_DEBUG")
55 ADD_DEFINITIONS("-DENABLE_COLORS")
57 ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/src)
59 ADD_CUSTOM_TARGET(accessibility-settings-set-value.edj
60 COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/resource/images -id ${CMAKE_SOURCE_DIR}/resource/icons -sd ${CMAKE_SOURCE_DIR}/resource/sounds
61 ${CMAKE_SOURCE_DIR}/resource/accessibility-settings-set-value.edc ${CMAKE_BINARY_DIR}/accessibility-settings-set-value.edj
62 DEPENDS ${CMAKE_SOURCE_DIR}/resource/accessibility-settings-set-value.edc
64 ADD_DEPENDENCIES(${PROJECT_NAME} accessibility-settings-set-value.edj)
65 INSTALL(FILES ${CMAKE_BINARY_DIR}/accessibility-settings-set-value.edj DESTINATION ${EDJDIR})
67 ADD_CUSTOM_TARGET(accessibility-smart-switch-accessory.edj
68 COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/resource/images -id ${CMAKE_SOURCE_DIR}/resource/icons -sd ${CMAKE_SOURCE_DIR}/resource/sounds
69 ${CMAKE_SOURCE_DIR}/resource/accessibility-smart-switch-accessory.edc ${CMAKE_BINARY_DIR}/accessibility-smart-switch-accessory.edj
70 DEPENDS ${CMAKE_SOURCE_DIR}/resource/accessibility-smart-switch-accessory.edc
72 ADD_DEPENDENCIES(${PROJECT_NAME} accessibility-smart-switch-accessory.edj)
73 INSTALL(FILES ${CMAKE_BINARY_DIR}/accessibility-smart-switch-accessory.edj DESTINATION ${EDJDIR})
75 ADD_CUSTOM_TARGET(screen-reader-settings-popup.edj
76 COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/resource/images -id ${CMAKE_SOURCE_DIR}/resource/icons -sd ${CMAKE_SOURCE_DIR}/resource/sounds
77 ${CMAKE_SOURCE_DIR}/resource/screen-reader-settings-popup.edc ${CMAKE_BINARY_DIR}/screen-reader-settings-popup.edj
78 DEPENDS ${CMAKE_SOURCE_DIR}/resource/screen-reader-settings-popup.edc
80 ADD_DEPENDENCIES(${PROJECT_NAME} screen-reader-settings-popup.edj)
81 INSTALL(FILES ${CMAKE_BINARY_DIR}/screen-reader-settings-popup.edj DESTINATION ${EDJDIR})
83 ADD_CUSTOM_TARGET(accessibility-smart-switch-accessory-popup.edj
84 COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/resource/images -id ${CMAKE_SOURCE_DIR}/resource/icons -sd ${CMAKE_SOURCE_DIR}/resource/sounds
85 ${CMAKE_SOURCE_DIR}/resource/accessibility-smart-switch-accessory-popup.edc ${CMAKE_BINARY_DIR}/accessibility-smart-switch-accessory-popup.edj
86 DEPENDS ${CMAKE_SOURCE_DIR}/resource/accessibility-smart-switch-accessory-popup.edc
88 ADD_DEPENDENCIES(${PROJECT_NAME} accessibility-smart-switch-accessory-popup.edj)
89 INSTALL(FILES ${CMAKE_BINARY_DIR}/accessibility-smart-switch-accessory-popup.edj DESTINATION ${EDJDIR})
91 INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/resource/icons DESTINATION ${RESDIR} FILES_MATCHING PATTERN "*.png")
93 INSTALL(FILES ${CMAKE_SOURCE_DIR}/${PKGNAME}.xml DESTINATION ${TZ_SYS_RO_PACKAGES})
96 ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/po)