From faf2738f53eeb059254197e994b223d025a20fd6 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 27 Jul 2022 07:56:32 +0200 Subject: [PATCH] Fix file(DOWNLOAD) by providing a relative path (#2881) Signed-off-by: Miguel Barro (cherry picked from commit 72cfe151b86034dd1e25617c739749696fda3a81) Co-authored-by: MiguelBarro <45819833+MiguelBarro@users.noreply.github.com> --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 55e54742c95..2ddc7dc36ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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") ]=])