Skip to content

Commit

Permalink
Fix file(DOWNLOAD) by providing a relative path (#2881)
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Barro <[email protected]>
(cherry picked from commit 72cfe15)

Co-authored-by: MiguelBarro <[email protected]>
  • Loading branch information
mergify[bot] and MiguelBarro authored Jul 27, 2022
1 parent e8cb0f4 commit faf2738
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -403,13 +403,13 @@ if(BUILD_DOCUMENTATION)

file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/readthedocs_custom_template.cmake [=[

file(DOWNLOAD "https://fast-dds.docs.eprosima.com/_/downloads/en/v${PROJECT_VERSION}/htmlzip/" "eprosima-fast-rtps.zip")
file(DOWNLOAD "https://fast-dds.docs.eprosima.com/_/downloads/en/v${PROJECT_VERSION}/htmlzip/" "./eprosima-fast-rtps.zip")
# TODO: when windows ci CMake version surpasses 17 favor file() instead of UNZIP as in the next line
# file(ARCHIVE_EXTRACT INPUT "eprosima-fast-rtps.zip" DESTINATION "${PROJECT_BINARY_DIR}/doc/")
execute_process(COMMAND "${UNZIP_EXE}" "eprosima-fast-rtps.zip" -d "${PROJECT_BINARY_DIR}/doc/")
# file(ARCHIVE_EXTRACT INPUT "./eprosima-fast-rtps.zip" DESTINATION "${PROJECT_BINARY_DIR}/doc/")
execute_process(COMMAND "${UNZIP_EXE}" "./eprosima-fast-rtps.zip" -d "${PROJECT_BINARY_DIR}/doc/")
file(REMOVE_RECURSE "${PROJECT_BINARY_DIR}/doc/manual")
file(RENAME "${PROJECT_BINARY_DIR}/doc/eprosima-fast-rtps-v${PROJECT_VERSION}" "${PROJECT_BINARY_DIR}/doc/manual")
file(REMOVE "eprosima-fast-rtps.zip")
file(REMOVE "./eprosima-fast-rtps.zip")

]=])

Expand Down

0 comments on commit faf2738

Please sign in to comment.