From 617e6082fa61b14410a2b264245c2814a9d3e89e Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Mon, 22 Oct 2007 17:16:33 -0400 Subject: [PATCH] ENH: fix bitmap escapes --- Modules/CPack.cmake | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake index 913cc1854..03e7c23c8 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)