X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=CMakeLists.txt;h=941cc0d1846f1246bd2f7b9cd4ce351cd6d8a51b;hb=cc0728043aa79ebabf5fd7b0c7572660515c4656;hp=daa263ba757830e9f0643675a2f365b855fab4bb;hpb=1ef33ee75879fecb9e80bc87cc8c060f3d9cb741;p=platform%2Fcore%2Fuifw%2Fstt.git diff --git a/CMakeLists.txt b/CMakeLists.txt index daa263b..941cc0d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,18 +1,93 @@ +# Copyright (c) 2011-2016 Samsung Electronics Co., Ltd All Rights Reserved +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# @file CMakeLists.txt +# @author Dongyeol Lee (dy3.lee@samsung.com) +# @version 0.1 +# @brief + CMAKE_MINIMUM_REQUIRED(VERSION 2.6) -PROJECT(libstt) +PROJECT(stt) + +SET(PREFIX ${CMAKE_INSTALL_PREFIX}) +SET(EXEC_PREFIX "${PREFIX}") +SET(VERSION 0.2.56) + +FIND_PROGRAM(UNAME NAMES uname) +EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH") + +ADD_DEFINITIONS("-DSTT_LIBDIR=\"${LIBDIR}\"") +ADD_DEFINITIONS("-Werror") ## Include common directory ## INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/common") +INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/include") ## Dependent packages ## INCLUDE(FindPkgConfig) -pkg_check_modules(pkgs REQUIRED - glib-2.0 dbus-1 - vconf dlog mm-player mm-common mm-camcorder openssl ecore +IF("${_TV_PRODUCT}" STREQUAL "TRUE") +pkg_check_modules(pkgs REQUIRED + aul capi-media-audio-io capi-media-wav-player capi-network-bluetooth capi-network-bluetooth-tv capi-system-info cynara-client cynara-session + dbus-1 dlog ecore glib-2.0 libgum libtzplatform-config libxml-2.0 libsystemd-login vconf vconf-internal-keys buxton2 farfield-voice-api ) +ELSE() +pkg_check_modules(pkgs REQUIRED + aul capi-media-audio-io capi-media-wav-player capi-system-info cynara-client cynara-session + dbus-1 dlog ecore glib-2.0 libgum libtzplatform-config libxml-2.0 libsystemd-login vconf vconf-internal-keys buxton2 +) +ENDIF() + +pkg_check_modules(pkgs_test REQUIRED + dlog ecore +) + +## API ## +ADD_SUBDIRECTORY(include) ## Client library ## ADD_SUBDIRECTORY(client) ## Server daemon ## ADD_SUBDIRECTORY(server) + +## Test ## +#ADD_SUBDIRECTORY(test) + +## Engine Parser ## +ADD_SUBDIRECTORY(engine-parser) + +## config ## +INSTALL(FILES ${CMAKE_SOURCE_DIR}/stt-config.xml DESTINATION ${TZ_SYS_RO_SHARE}/voice/stt/1.0) + +## Dbus service ## +INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.voice.sttserver.service DESTINATION ${TZ_SYS_RO_SHARE}/dbus-1/services) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.voice.sttservercustom.service DESTINATION ${TZ_SYS_RO_SHARE}/dbus-1/services) + +INSTALL(FILES ${CMAKE_SOURCE_DIR}/stt-server.conf DESTINATION /etc/dbus-1/session.d) + +## voice_getengine ## +IF("${ARCH}" MATCHES "^arm.*") +INSTALL(PROGRAMS ${CMAKE_SOURCE_DIR}/bin/armv7l/voice_getengine DESTINATION ${TZ_SYS_BIN}) +ELSEIF("${ARCH}" MATCHES "^i586.*") +INSTALL(PROGRAMS ${CMAKE_SOURCE_DIR}/bin/i586/voice_getengine DESTINATION ${TZ_SYS_BIN}) +ELSEIF("${ARCH}" MATCHES "^i686.*") +INSTALL(PROGRAMS ${CMAKE_SOURCE_DIR}/bin/i586/voice_getengine DESTINATION ${TZ_SYS_BIN}) +ELSEIF("${ARCH}" MATCHES "^aarch64.*") +INSTALL(PROGRAMS ${CMAKE_SOURCE_DIR}/bin/aarch64/voice_getengine DESTINATION ${TZ_SYS_BIN}) +ELSEIF("${ARCH}" MATCHES "^x86_64.*") +INSTALL(PROGRAMS ${CMAKE_SOURCE_DIR}/bin/x86_64/voice_getengine DESTINATION ${TZ_SYS_BIN}) +ENDIF() + +