diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2009-11-12 22:58:37 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2009-11-12 22:58:37 (GMT) |
commit | 6e8aa6cb52d5d755825e459463108c163d6dc0b6 (patch) | |
tree | 7fb614d4de66487d66e82b5206a42bcb4bfe6754 /Modules/CPack.cmake | |
parent | fb8d583054b3119ff204cc631a27d955b421533a (diff) | |
download | CMake-6e8aa6cb52d5d755825e459463108c163d6dc0b6.zip CMake-6e8aa6cb52d5d755825e459463108c163d6dc0b6.tar.gz CMake-6e8aa6cb52d5d755825e459463108c163d6dc0b6.tar.bz2 |
Fix regression with CPACK_NSIS_PACKAGE_NAME, if the project is setting the CPACK_NSIS_DISPLAY_NAME then use that as the default value and not the CPACK_PACKAGE_INSTALL_DIRECTORY, also make sure it escapes \ correctly.
Diffstat (limited to 'Modules/CPack.cmake')
-rw-r--r-- | Modules/CPack.cmake | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake index 9630476..93cf28e 100644 --- a/Modules/CPack.cmake +++ b/Modules/CPack.cmake @@ -793,9 +793,23 @@ cpack_set_if_not_set(CPACK_INSTALL_CMAKE_PROJECTS "${CMAKE_BINARY_DIR};${CMAKE_PROJECT_NAME};ALL;/") cpack_set_if_not_set(CPACK_CMAKE_GENERATOR "${CMAKE_GENERATOR}") cpack_set_if_not_set(CPACK_TOPLEVEL_TAG "${CPACK_SYSTEM_NAME}") - +# if the user has set CPACK_NSIS_DISPLAY_NAME remember it +if(DEFINED CPACK_NSIS_DISPLAY_NAME) + SET(CPACK_NSIS_DISPLAY_NAME_SET TRUE) +endif() +# if the user has set CPACK_NSIS_DISPLAY +# explicitly, then use that as the default +# value of CPACK_NSIS_PACKAGE_NAME instead +# of CPACK_PACKAGE_INSTALL_DIRECTORY cpack_set_if_not_set(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}") -cpack_set_if_not_set(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}") + +if(CPACK_NSIS_DISPLAY_NAME_SET) + string(REPLACE "\\" "\\\\" + _NSIS_DISPLAY_NAME_TMP "${CPACK_NSIS_DISPLAY_NAME}") + cpack_set_if_not_set(CPACK_NSIS_PACKAGE_NAME "${_NSIS_DISPLAY_NAME_TMP}") +else() + cpack_set_if_not_set(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}") +endif() cpack_set_if_not_set(CPACK_OUTPUT_CONFIG_FILE "${CMAKE_BINARY_DIR}/CPackConfig.cmake") |