Skip to content

Commit

Permalink
Adapted to new shiny package structure of cerevoice_sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
iki authored and iki committed May 16, 2014
1 parent 3a01bf4 commit d6a1a5d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 69 deletions.
66 changes: 6 additions & 60 deletions cerevoice_tts/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,58 +1,19 @@
cmake_minimum_required(VERSION 2.8.3)
project(cerevoice_tts)

if(EXISTS "$ENV{HOME}/cerevoice")
MESSAGE(STATUS "Setting location of CereVoice to $ENV{HOME}/cerevoice")
set(cerevoice_DIR $ENV{HOME}/cerevoice)
elseif(EXISTS "$ENV{HOME}/CereVoice")
MESSAGE(STATUS "Setting location of CereVoice to $ENV{HOME}/CereVoice")
set(cerevoice_DIR $ENV{HOME}/CereVoice)
elseif(EXISTS "$ENV{HOME}/Cerevoice")
MESSAGE(STATUS "Setting location of CereVoice to $ENV{HOME}/Cerevoice")
set(cerevoice_DIR $ENV{HOME}/Cerevoice)
elseif(EXISTS "$ENV{HOME}/cereproc/cerevoice")
MESSAGE(STATUS "Setting location of CereVoice to $ENV{HOME}/cereproc/cerevoice")
set(cerevoice_DIR $ENV{HOME}/cereproc/cerevoice)
elseif(EXISTS "$ENV{HOME}/cerevoice_sdk")
MESSAGE(STATUS "Setting location of CereVoice to $ENV{HOME}/cerevoice_sdk")
set(cerevoice_DIR $ENV{HOME}/cerevoice_sdk)
elseif(EXISTS "/opt/cereproc/cerevoice")
MESSAGE(STATUS "Setting location of CereVoice to /opt/cereproc/cerevoice")
set(cerevoice_DIR /opt/cereproc/cerevoice)
elseif(EXISTS "/opt/cerevoice")
MESSAGE(STATUS "Setting location of CereVoice to /opt/cerevoice")
set(cerevoice_DIR /opt/cerevoice)
elseif(EXISTS "${PROJECT_SOURCE_DIR}/../../cerevoice_sdk")
set(cerevoice_DIR ${PROJECT_SOURCE_DIR}/../../cerevoice_sdk)
MESSAGE(STATUS "Setting location of CereVoice to ${cerevoice_DIR}")
elseif(EXISTS "${PROJECT_SOURCE_DIR}/../cerevoice_sdk")
set(cerevoice_DIR ${PROJECT_SOURCE_DIR}/../cerevoice_sdk)
MESSAGE(STATUS "Setting location of CereVoice to ${cerevoice_DIR}")
# here you can add more locations
else()
MESSAGE(SEND_ERROR "Can't find location of CereVoice! Modify the CMakeLists.txt to find your installation directory")
endif()

set(cerevoice_LIBS
${cerevoice_DIR}/cerevoice_eng/lib/libcerevoice_eng_shared.so
${cerevoice_DIR}/cerevoice_pmod/lib/libcerevoice_pmod_shared.so
${cerevoice_DIR}/cerehts/lib/libcerehts_shared.so
${cerevoice_DIR}/cerevoice/lib/libcerevoice_shared.so

${cerevoice_DIR}/cerevoice_aud/lib/libcerevoice_aud_shared.so
)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
actionlib
cerevoice_tts_msgs
roscpp
cerevoice_sdk
)

## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)
find_package(ALSA REQUIRED)

###################################
## catkin specific configuration ##
Expand All @@ -66,8 +27,8 @@ find_package(catkin REQUIRED COMPONENTS
catkin_package(
INCLUDE_DIRS include
# LIBRARIES cerevoice_tts
CATKIN_DEPENDS actionlib cerevoice_tts_msgs roscpp
# DEPENDS system_lib
CATKIN_DEPENDS actionlib cerevoice_tts_msgs roscpp cerevoice_sdk
DEPENDS ALSA
)

###########
Expand All @@ -80,28 +41,18 @@ catkin_package(
include_directories(
include
${catkin_INCLUDE_DIRS}
${cerevoice_DIR}/cerevoice_eng/include
${cerevoice_DIR}/cerevoice_aud/include
)

## Declare a cpp library
#add_library(cerevoice_tts
# src/${PROJECT_NAME}/cerevoice_tts.cpp
# )

## Declare a cpp executable
add_executable(cerevoice_tts_node src/cerevoice_tts_node.cpp src/CerevoiceTts.cpp)

## Add cmake target dependencies of the executable/library
## as an example, message headers may need to be generated before nodes
# add_dependencies(cerevoice_tts_node cerevoice_tts_generate_messages_cpp)
add_dependencies(cerevoice_tts_node cerevoice_tts_msgs_generate_messages_cpp)

## Specify libraries to link a library or executable target against
target_link_libraries(cerevoice_tts_node
${catkin_LIBRARIES}

${cerevoice_LIBS}
asound
)

#############
Expand All @@ -112,11 +63,6 @@ if(CATKIN_ENABLE_TESTING)
catkin_add_gtest(${PROJECT_NAME}-test test/test_cerevoice_tts.cpp src/CerevoiceTts.cpp)
if(TARGET ${PROJECT_NAME}-test)
target_link_libraries(${PROJECT_NAME}-test
${catkin_LIBRARIES}
asound
${cerevoice_LIBS})
${catkin_LIBRARIES})
endif()
endif()

## Add folders to be run by python nosetests
# catkin_add_nosetests(test)
18 changes: 9 additions & 9 deletions cerevoice_tts/launch/tts.launch
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<launch>
<param name="cerevoice_tts_node/startup_sentence" type="string" value="Text zu Sprache bereit." />
<rosparam param="voices" ns="cerevoice_tts_node" subst_value="true">
- path: ../cerevoice_sdk/voices/cerevoice_alex_3.0.6_22k.voice
license: ../cerevoice_sdk/voices/license.lic
abbrev: ../cerevoice_sdk/example_data/abbrev_german.txt
- path: ../cerevoice_sdk/voices/cerevoice_gudrun_3.0.6_22k.voice
license: ../cerevoice_sdk/voices/license.lic
abbrev: ../cerevoice_sdk/example_data/abbrev_german.txt
- path: ../cerevoice_sdk/voices/cerevoice_heather_3.0.8_22k.voice
license: ../cerevoice_sdk/voices/cereproc_license.lic
lexicon: ../cerevoice_sdk/example_data/additional.lex
- path: $(find cerevoice_sdk)/voices/cerevoice_alex_3.0.6_22k.voice
license: $(find cerevoice_sdk)/voices/license.lic
abbrev: $(find cerevoice_sdk)/example_data/abbrev_german.txt
- path: $(find cerevoice_sdk)/voices/cerevoice_gudrun_3.0.6_22k.voice
license: $(find cerevoice_sdk)/voices/license.lic
abbrev: $(find cerevoice_sdk)/example_data/abbrev_german.txt
- path: $(find cerevoice_sdk)/voices/cerevoice_heather_3.0.8_22k.voice
license: $(find cerevoice_sdk)/voices/cereproc_license.lic
lexicon: $(find cerevoice_sdk)/example_data/additional.lex
</rosparam>
<node name="cerevoice_tts_node" pkg="cerevoice_tts" type="cerevoice_tts_node" respawn="false" output="screen" />
</launch>
2 changes: 2 additions & 0 deletions cerevoice_tts/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
<build_depend>actionlib</build_depend>
<build_depend>cerevoice_tts_msgs</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>cerevoice_sdk</build_depend>
<run_depend>actionlib</run_depend>
<run_depend>cerevoice_tts_msgs</run_depend>
<run_depend>roscpp</run_depend>
<run_depend>cerevoice_sdk</run_depend>


<!-- The export tag contains other, unspecified, tags -->
Expand Down

0 comments on commit d6a1a5d

Please sign in to comment.