SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(EXEC_PREFIX "${PREFIX}")
-SET(VERSION 0.2.10)
+SET(VERSION ${VERSION})
+
+FIND_PROGRAM(UNAME NAMES uname)
+EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
ADD_DEFINITIONS("-DVOICE_LIBDIR=\"${LIBDIR}\"")
ADD_DEFINITIONS("-Werror")
+# for the use of ecore_wl2
+ADD_DEFINITIONS("-DEFL_BETA_API_SUPPORT")
# pkg config tool
INCLUDE(FindPkgConfig)
## Dependent packages ##
INCLUDE(FindPkgConfig)
-IF("${_TV_PRODUCT}" STREQUAL "TRUE")
-pkg_check_modules(pkgs REQUIRED
- aul capi-appfw-app-control capi-appfw-app-manager capi-base-common capi-media-audio-io capi-media-sound-manager ecore-wayland
- capi-network-bluetooth capi-network-bluetooth-tv capi-system-info cynara-client cynara-session dbus-1 db-util dlog ecore glib-2.0 json-glib-1.0 libtzplatform-config libxml-2.0 sqlite3 vconf msfapi
-)
-ELSE()
pkg_check_modules(pkgs REQUIRED
- aul capi-appfw-app-control capi-appfw-app-manager capi-base-common capi-media-audio-io capi-media-sound-manager ecore-wayland
- capi-system-info cynara-client cynara-session dbus-1 db-util dlog ecore glib-2.0 json-glib-1.0 libtzplatform-config libxml-2.0 sqlite3 vconf
+ aul buxton2 capi-appfw-app-control capi-appfw-app-manager capi-base-common capi-media-audio-io capi-media-sound-manager ecore-wl2
+ capi-system-info cynara-client cynara-session db-util dlog ecore glib-2.0 json-glib-1.0 libgum libtzplatform-config libxml-2.0 sqlite3 vconf gmock bundle rpc-port
)
-ENDIF()
## API ##
## Server daemon ##
ADD_SUBDIRECTORY(server)
+## Engine Parser ##
+ADD_SUBDIRECTORY(engine-parser)
+
+## Dependency audio manager ##
+ADD_SUBDIRECTORY(audio-manager)
+
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/voice-control.info DESTINATION ${TZ_SYS_RO_SHARE}/parser-plugins)
+
## config ##
INSTALL(FILES ${CMAKE_SOURCE_DIR}/vc-config.xml DESTINATION ${TZ_SYS_RO_SHARE}/voice/vc/1.0)
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.voice.vcserver.service DESTINATION ${TZ_SYS_RO_SHARE}/dbus-1/services)
-
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/vc-server.conf DESTINATION /etc/dbus-1/session.d)
+## vc_getengine ##
+IF("${ARCH}" MATCHES "^arm.*")
+INSTALL(PROGRAMS ${CMAKE_SOURCE_DIR}/bin/armv7l/vc_getengine DESTINATION ${TZ_SYS_BIN})
+ELSEIF("${ARCH}" MATCHES "^i586.*")
+INSTALL(PROGRAMS ${CMAKE_SOURCE_DIR}/bin/i586/vc_getengine DESTINATION ${TZ_SYS_BIN})
+ELSEIF("${ARCH}" MATCHES "^i686.*")
+INSTALL(PROGRAMS ${CMAKE_SOURCE_DIR}/bin/i586/vc_getengine DESTINATION ${TZ_SYS_BIN})
+ELSEIF("${ARCH}" MATCHES "^aarch64.*")
+INSTALL(PROGRAMS ${CMAKE_SOURCE_DIR}/bin/aarch64/vc_getengine DESTINATION ${TZ_SYS_BIN})
+ELSEIF("${ARCH}" MATCHES "^x86_64.*")
+INSTALL(PROGRAMS ${CMAKE_SOURCE_DIR}/bin/x86_64/vc_getengine DESTINATION ${TZ_SYS_BIN})
+ENDIF()
-## Upgrade script ##
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/502.vc_upgrade_24to30.sh DESTINATION ${TZ_SYS_RO_SHARE}/upgrade/scripts)
+## Test
+IF(NOT DEFINED MINIMUM_BUILD)
+ENABLE_TESTING()
+SET(UNITTEST_VC vc-unittests)
+ADD_TEST(NAME ${UNITTEST_VC} COMMAND ${UNITTEST_VC}
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests)
+ADD_SUBDIRECTORY(tests)
+ENDIF(NOT DEFINED MINIMUM_BUILD)