From 6d7f7547ec6a64c34258dfcb54db9abc6754602f Mon Sep 17 00:00:00 2001 From: scottr Date: Fri, 14 May 2021 08:20:59 -0700 Subject: [PATCH] [cpack_installer] fix incorrect caching type of installer download url and add configure of download info --- cmake/Packaging.cmake | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cmake/Packaging.cmake b/cmake/Packaging.cmake index e398ea7509..188cfbf52d 100644 --- a/cmake/Packaging.cmake +++ b/cmake/Packaging.cmake @@ -15,7 +15,7 @@ endif() # set the common cpack variables first so they are accessible via configure_file # when the platforms specific properties are applied below -set(LY_INSTALLER_DOWNLOAD_URL "" CACHE PATH "URL embded into the installer to download additional artifacts") +set(LY_INSTALLER_DOWNLOAD_URL "" CACHE STRING "URL embded into the installer to download additional artifacts") set(CPACK_PACKAGE_VENDOR "${PROJECT_NAME}") set(CPACK_PACKAGE_VERSION "${LY_VERSION_STRING}") @@ -34,7 +34,6 @@ set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_VER # custom cpack cache variables for use in pre/post build scripts set(CPACK_SOURCE_DIR ${CMAKE_SOURCE_DIR}/cmake) set(CPACK_BINARY_DIR ${CMAKE_BINARY_DIR}/installer) -set(CPACK_DOWNLOAD_URL ${LY_INSTALLER_DOWNLOAD_URL}) # attempt to apply platform specific settings ly_get_absolute_pal_filename(pal_dir ${CMAKE_SOURCE_DIR}/cmake/Platform/${PAL_HOST_PLATFORM_NAME}) @@ -86,3 +85,11 @@ ly_configure_cpack_component( DISPLAY_NAME "${PROJECT_NAME} Core" DESCRIPTION "${PROJECT_NAME} Headers, Libraries and Tools" ) + +if(LY_INSTALLER_DOWNLOAD_URL) + cpack_configure_downloads( + ${LY_INSTALLER_DOWNLOAD_URL} + UPLOAD_DIRECTORY artifacts + ALL + ) +endif()