diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2007-10-22 15:40:07 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2007-10-22 15:40:07 (GMT) |
commit | cfb84d8562646662cfee9622f657e8eacdd49f8c (patch) | |
tree | 8574a581dc4ea7fdb7ba438a518bf8d535b7cf39 /Modules | |
parent | 397d7ff29d0add12feeb08f7e25271128012b996 (diff) | |
download | CMake-cfb84d8562646662cfee9622f657e8eacdd49f8c.zip CMake-cfb84d8562646662cfee9622f657e8eacdd49f8c.tar.gz CMake-cfb84d8562646662cfee9622f657e8eacdd49f8c.tar.bz2 |
ENH: allow CPACK_PACKAGE_ICON to be not set
Diffstat (limited to 'Modules')
-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 |