From b807cd9b54e4a9324ddd64281254b6fe80be5b24 Mon Sep 17 00:00:00 2001 From: Konstantin Podsvirov Date: Mon, 19 Sep 2016 18:48:27 +0300 Subject: CPackIFW: Add 'cpack_ifw_add_package_resources' command --- Modules/CPackIFW.cmake | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'Modules/CPackIFW.cmake') diff --git a/Modules/CPackIFW.cmake b/Modules/CPackIFW.cmake index 36fc276338..bb1285d78a 100644 --- a/Modules/CPackIFW.cmake +++ b/Modules/CPackIFW.cmake @@ -131,6 +131,14 @@ # # Filename for a custom installer control script. # +# .. variable:: CPACK_IFW_PACKAGE_RESOURCES +# +# List of additional resources ('.qrc' files) to include in the installer +# binary. +# +# You can use :command:`cpack_ifw_add_package_resources` command to resolve +# relative paths. +# # .. variable:: CPACK_IFW_REPOSITORIES_ALL # # The list of remote repositories. @@ -337,6 +345,19 @@ # ``DISPLAY_NAME`` # is string to display instead of the URL. # +# +# .. command:: cpack_ifw_add_package_resources +# +# Add additional resources in the installer binary. +# +# :: +# +# cpack_ifw_add_package_resources( ...) +# +# This command will also add the specified files +# to a variable :variable:`CPACK_IFW_PACKAGE_RESOURCES`. +# +# # Example usage # ^^^^^^^^^^^^^ # @@ -741,6 +762,17 @@ macro(cpack_ifw_update_repository reponame) endmacro() +# Macro for adding resources +macro(cpack_ifw_add_package_resources) + set(_CPACK_IFW_PACKAGE_RESOURCES ${ARGV}) + _cpack_ifw_resolve_file_list(_CPACK_IFW_PACKAGE_RESOURCES) + list(APPEND CPACK_IFW_PACKAGE_RESOURCES ${_CPACK_IFW_PACKAGE_RESOURCES}) + set(_CPACK_IFWQRC_STR "list(APPEND CPACK_IFW_PACKAGE_RESOURCES \"${_CPACK_IFW_PACKAGE_RESOURCES}\")\n") + if(CPack_CMake_INCLUDED) + file(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${_CPACK_IFWQRC_STR}") + endif() +endmacro() + # Resolve package control script _cpack_ifw_resolve_script(CPACK_IFW_PACKAGE_CONTROL_SCRIPT) -- cgit v1.2.1