diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CPack.cmake | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake index 913cc18..03e7c23 100644 --- a/Modules/CPack.cmake +++ b/Modules/CPack.cmake @@ -183,15 +183,21 @@ cpack_set_if_not_set(CPACK_SOURCE_OUTPUT_CONFIG_FILE cpack_set_if_not_set(CPACK_USE_DESTDIR ON) cpack_set_if_not_set(CPACK_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") -cpack_encode_variables() cpack_set_if_not_set(CPACK_NSIS_INSTALLER_ICON_CODE "") + +# if CPACK_PACKAGE_ICON is set, then create a +# cpack variable that contains the NSIS code to define +# the CPACK_PACKAGE_ICON and MUI_HEADERIMAGE_BITMAP, this is used +# as an icon in the install wizard if(CPACK_PACKAGE_ICON) set(CPACK_NSIS_INSTALLER_ICON_CODE " -!define CPACK_PACKAGE_ICON "@CPACK_PACKAGE_ICON@ -!define MUI_HEADERIMAGE_BITMAP "@CPACK_PACKAGE_ICON@ +!define CPACK_PACKAGE_ICON \\\"@CPACK_PACKAGE_ICON@\\\" +!define MUI_HEADERIMAGE_BITMAP \\\"@CPACK_PACKAGE_ICON@\\\" ") endif(CPACK_PACKAGE_ICON) +cpack_encode_variables() + configure_file("${cpack_input_file}" "${CPACK_OUTPUT_CONFIG_FILE}" @ONLY IMMEDIATE) |