Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions 3rdparty/aques_talk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ find_package(catkin REQUIRED)

catkin_package()

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

#
include(ExternalProject)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/download/src/)
set(LIBRARY_URL https://www.a-quest.com/archive/package/aqtk2-lnx-eva_230.zip)
file(DOWNLOAD
${LIBRARY_URL}
${CMAKE_CURRENT_BINARY_DIR}/download/src/aqtk2-lnx-eva_230.zip
STATUS DOWNLOAD_STATUS
LOG DOWNLOAD_LOG
SHOW_PROGRESS
)
list(GET DOWNLOAD_STATUS 0 DOWNLOAD_CODE)
list(GET DOWNLOAD_STATUS 1 DOWNLOAD_MESSAGE)
if(NOT DOWNLOAD_CODE EQUAL 0)
message(WARNING "Download failed with status: ${DOWNLOAD_CODE}")
message(WARNING "Error message: ${DOWNLOAD_MESSAGE}")
message(WARNING "Log: ${DOWNLOAD_LOG}")
else()
externalproject_add(aqtk2-lnx-eva
PREFIX download
URL https://www.a-quest.com/archive/package/aqtk2-lnx-eva_230.zip
URL ${LIBRARY_URL}
URL_HASH MD5=4b0641066a826d0be7a016a162ab4043
TIMEOUT 120
CONFIGURE_COMMAND bash -c "echo configure"
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)"
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/"
BUILD_IN_SOURCE 1
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
)

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

# Make compilation depend on our target:
add_dependencies(SampleTalk aqtk2-lnx-eva)
endif()

# install
catkin_install_python(PROGRAMS text2wave
Expand Down
Loading