ENH: allow CPACK_PACKAGE_ICON to be not set

This commit is contained in:
Bill Hoffman 2007-10-22 11:40:07 -04:00
parent 397d7ff29d
commit cfb84d8562
2 changed files with 11 additions and 5 deletions

View File

@ -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_set_if_not_set(CPACK_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
cpack_encode_variables() 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) configure_file("${cpack_input_file}" "${CPACK_OUTPUT_CONFIG_FILE}" @ONLY IMMEDIATE)
# Generate source file # Generate source file

View File

@ -408,11 +408,7 @@ FunctionEnd
;-------------------------------- ;--------------------------------
; Define some macro setting for the gui ; Define some macro setting for the gui
@CPACK_NSIS_INSTALLER_ICON_CODE@
!define CPACK_PACKAGE_ICON "@CPACK_PACKAGE_ICON@"
!ifdef CPACK_PACKAGE_ICON
!define MUI_HEADERIMAGE_BITMAP "@CPACK_PACKAGE_ICON@"
!endif
;-------------------------------- ;--------------------------------
;Pages ;Pages