Skip to content

Commit 37af272

Browse files
authored
Merge pull request #533 from k-okada/fix_ros_o_aques_talk
2 parents a130879 + 147e38b commit 37af272

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

3rdparty/aques_talk/CMakeLists.txt

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ find_package(catkin REQUIRED)
55

66
catkin_package()
77

8-
if(DEFINED ENV{GITHUB_ACTIONS})
9-
message(WARNING "skip downloading aques_talk within GithubAction")
10-
return()
11-
endif()
128
# Considering the use of docker in addition to the usual use,
139
# we use dpkg-architecture command instead of ${CMAKE_SYSTEM_PROCESSOR} to get the architecture.
1410
# https://stackoverflow.com/a/58222507
@@ -30,14 +26,32 @@ message(STATUS "AQTK2_LNX_LIB_DIR : ${AQTK2_LNX_LIB_DIR}")
3026

3127
#
3228
include(ExternalProject)
29+
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/download/src/)
30+
set(LIBRARY_URL https://www.a-quest.com/archive/package/aqtk2-lnx-eva_230.zip)
31+
file(DOWNLOAD
32+
${LIBRARY_URL}
33+
${CMAKE_CURRENT_BINARY_DIR}/download/src/aqtk2-lnx-eva_230.zip
34+
STATUS DOWNLOAD_STATUS
35+
LOG DOWNLOAD_LOG
36+
SHOW_PROGRESS
37+
)
38+
list(GET DOWNLOAD_STATUS 0 DOWNLOAD_CODE)
39+
list(GET DOWNLOAD_STATUS 1 DOWNLOAD_MESSAGE)
40+
if(NOT DOWNLOAD_CODE EQUAL 0)
41+
message(WARNING "Download failed with status: ${DOWNLOAD_CODE}")
42+
message(WARNING "Error message: ${DOWNLOAD_MESSAGE}")
43+
message(WARNING "Log: ${DOWNLOAD_LOG}")
44+
else()
3345
externalproject_add(aqtk2-lnx-eva
3446
PREFIX download
35-
URL https://www.a-quest.com/archive/package/aqtk2-lnx-eva_230.zip
47+
URL ${LIBRARY_URL}
48+
URL_HASH MD5=4b0641066a826d0be7a016a162ab4043
3649
TIMEOUT 120
3750
CONFIGURE_COMMAND bash -c "echo configure"
3851
BUILD_COMMAND bash -c "(cd ${AQTK2_LNX_LIB_DIR} && ln -sf libAquesTalk2Eva.so.2.3 libAquesTalk2.so && ln -sf libAquesTalk2Eva.so.2.3 libAquesTalk2.so.2)"
3952
INSTALL_COMMAND bash -c "cp -P ${AQTK2_LNX_LIB_DIR}/libAquesTalk2* ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_LIB_DESTINATION} && mkdir -p ${CMAKE_CURRENT_SOURCE_DIR}/phont/ && cp phont/* ${CMAKE_CURRENT_SOURCE_DIR}/phont/"
4053
BUILD_IN_SOURCE 1
54+
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
4155
)
4256

4357
include_directories(${CMAKE_CURRENT_BINARY_DIR}/download/src/aqtk2-lnx-eva/${AQTK2_LNX_LIB_DIR})
@@ -48,6 +62,7 @@ target_link_libraries(SampleTalk AquesTalk2)
4862

4963
# Make compilation depend on our target:
5064
add_dependencies(SampleTalk aqtk2-lnx-eva)
65+
endif()
5166

5267
# install
5368
catkin_install_python(PROGRAMS text2wave

0 commit comments

Comments
 (0)