summaryrefslogtreecommitdiff
path: root/Modules/CPackIFW.cmake
diff options
context:
space:
mode:
authorKonstantin Podsvirov <konstantin@podsvirov.pro>2016-09-19 18:48:27 +0300
committerBrad King <brad.king@kitware.com>2016-09-19 13:17:59 -0400
commitb807cd9b54e4a9324ddd64281254b6fe80be5b24 (patch)
tree683a118372760a9a85a808151b093e8aa0cf9e21 /Modules/CPackIFW.cmake
parent5c87b92b1b7888ee032e3c2a75f35f1f94f4dfa5 (diff)
downloadcmake-b807cd9b54e4a9324ddd64281254b6fe80be5b24.tar.gz
CPackIFW: Add 'cpack_ifw_add_package_resources' command
Diffstat (limited to 'Modules/CPackIFW.cmake')
-rw-r--r--Modules/CPackIFW.cmake32
1 files changed, 32 insertions, 0 deletions
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(<file_path> <file_path> ...)
+#
+# 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)