1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
4 # FIND ALL SOURCE IN A SOURCE DIRECTORY
5 #AUX_SOURCE_DIRECTORY(${CMAKE_SOURCE_DIR}/src SRCS)
7 SET(SRCS ${CMAKE_SOURCE_DIR}/src/app_tracker.c
8 ${CMAKE_SOURCE_DIR}/src/flat_navi.c
9 ${CMAKE_SOURCE_DIR}/src/main.c
10 ${CMAKE_SOURCE_DIR}/src/screen_reader.c
11 ${CMAKE_SOURCE_DIR}/src/screen_reader_haptic.c
12 ${CMAKE_SOURCE_DIR}/src/screen_reader_spi.c
13 ${CMAKE_SOURCE_DIR}/src/screen_reader_switch.c
14 ${CMAKE_SOURCE_DIR}/src/screen_reader_system.c
15 ${CMAKE_SOURCE_DIR}/src/screen_reader_tts.c
16 ${CMAKE_SOURCE_DIR}/src/screen_reader_vconf.c
17 ${CMAKE_SOURCE_DIR}/src/smart_notification.c
18 ${CMAKE_SOURCE_DIR}/src/lua_engine.c
19 ${CMAKE_SOURCE_DIR}/src/keyboard_tracker.c
24 INCLUDE(CMakeLists.sub)
25 SET(RESOURCE_DIR "${CMAKE_SOURCE_DIR}/res")
26 SET(LOCALEDIR "${TZ_SYS_RO_APP}/org.tizen.screen-reader/res/locale")
27 ADD_DEFINITIONS(-DSCRIPTDIR="${TZ_SYS_RO_APP}/org.tizen.screen-reader/res/scripts")
29 IF("${SEC_FEATURE_TAPI_ENABLE}" STREQUAL "1")
30 MESSAGE("SEC_FEATURE_TAPI_ENABLE: ${SEC_FEATURE_TAPI_ENABLE}")
31 SET(TAPI_REQUIRED_PKG "tapi")
33 ${CMAKE_SOURCE_DIR}/src/dbus_gesture_adapter.c
34 ${CMAKE_SOURCE_DIR}/src/elm_access_adapter.c
35 ${CMAKE_SOURCE_DIR}/src/screen_reader_gestures.c
36 ${CMAKE_SOURCE_DIR}/src/navigator.c
37 ${CMAKE_SOURCE_DIR}/src/window_tracker.c)
39 MESSAGE("SEC_FEATURE_TAPI_ENABLE: ${SEC_FEATURE_TAPI_ENABLE}")
40 ADD_DEFINITIONS("-DSCREEN_READER_TV")
43 IF("${X11_ENABLED}" STREQUAL "1")
44 MESSAGE(STATUS "X11 is enabled")
45 SET(CONDITIONAL_PACKAGES ${CONDITIONAL_PACKAGES} "ecore-x")
46 ADD_DEFINITIONS("-DX11_ENABLED")
48 MESSAGE(STATUS "X11 is disabled - using wayland")
49 SET(CONDITIONAL_PACKAGES ${CONDITIONAL_PACKAGES} "ecore-wayland")
52 INCLUDE(FindPkgConfig)
53 pkg_check_modules(pkgs REQUIRED
64 capi-media-tone-player
66 capi-network-bluetooth
71 ${CONDITIONAL_PACKAGES}
74 FOREACH(flag ${pkgs_CFLAGS})
75 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
78 SET(CMAKE_C_FLAGS_DUMP "${CMAKE_C_FLAGS}")
79 SET(CMAKE_CXX_FLAGS_DUMP "${CMAKE_CXX_FLAGS}")
80 SET(CMAKE_C_FLAGS "${SLP_DEBUG_FLAGS} ${SLP_OPT_FLAGS} ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} ${SLP_COMPILER_FLAGS} -fPIE")
81 SET(CMAKE_CXX_FLAGS "${SLP_DEBUG_FLAGS} ${SLP_OPT_FLAGS} ${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} ${SLP_COMPILER_FLAGS}")
83 ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
85 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} ${SLP_LD_PATH_FLAGS} ${SLP_LD_FLAGS} ${SLP_LINKER_FLAGS} "-pie")
88 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin)
89 INSTALL(DIRECTORY ${RESOURCE_DIR}/icons DESTINATION res)
90 INSTALL(DIRECTORY ${RESOURCE_DIR}/scripts DESTINATION res)
91 # Install Manifest File
92 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/org.tizen.screen-reader.xml.in ${CMAKE_CURRENT_BINARY_DIR}/org.tizen.screen-reader.xml)
93 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.tizen.screen-reader.xml DESTINATION ${TZ_SYS_RO_PACKAGES})
95 ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/res/po)
96 ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/tests)
97 ADD_TEST(NAME smart_navi_tests COMMAND ${CMAKE_SOURCE_DIR}/tests/smart_navi_test_suite)