diff options
-rw-r--r-- | Modules/CPack.cmake | 10 | ||||
-rw-r--r-- | Modules/NSIS.template.in | 6 |
2 files changed, 11 insertions, 5 deletions
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake index 3230e90..913cc18 100644 --- a/Modules/CPack.cmake +++ b/Modules/CPack.cmake @@ -184,6 +184,16 @@ 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) + set(CPACK_NSIS_INSTALLER_ICON_CODE " +!define CPACK_PACKAGE_ICON "@CPACK_PACKAGE_ICON@ +!define MUI_HEADERIMAGE_BITMAP "@CPACK_PACKAGE_ICON@ +") +endif(CPACK_PACKAGE_ICON) + + + configure_file("${cpack_input_file}" "${CPACK_OUTPUT_CONFIG_FILE}" @ONLY IMMEDIATE) # Generate source file diff --git a/Modules/NSIS.template.in b/Modules/NSIS.template.in index 976f435..18e1a4f 100644 --- a/Modules/NSIS.template.in +++ b/Modules/NSIS.template.in @@ -408,11 +408,7 @@ FunctionEnd ;-------------------------------- ; Define some macro setting for the gui - - !define CPACK_PACKAGE_ICON "@CPACK_PACKAGE_ICON@" - !ifdef CPACK_PACKAGE_ICON - !define MUI_HEADERIMAGE_BITMAP "@CPACK_PACKAGE_ICON@" - !endif +@CPACK_NSIS_INSTALLER_ICON_CODE@ ;-------------------------------- ;Pages |