summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2007-10-22 15:40:07 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2007-10-22 15:40:07 (GMT)
commitcfb84d8562646662cfee9622f657e8eacdd49f8c (patch)
tree8574a581dc4ea7fdb7ba438a518bf8d535b7cf39
parent397d7ff29d0add12feeb08f7e25271128012b996 (diff)
downloadCMake-cfb84d8562646662cfee9622f657e8eacdd49f8c.zip
CMake-cfb84d8562646662cfee9622f657e8eacdd49f8c.tar.gz
CMake-cfb84d8562646662cfee9622f657e8eacdd49f8c.tar.bz2
ENH: allow CPACK_PACKAGE_ICON to be not set
-rw-r--r--Modules/CPack.cmake10
-rw-r--r--Modules/NSIS.template.in6
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