[CMake] CMake 2.8.0 RC 7 ready for testing!

Bill Hoffman bill.hoffman at kitware.com
Thu Nov 12 18:04:20 EST 2009


Bill Hoffman wrote:

> 
> # if the user has set CPACK_NSIS_DISPLAY_NAME
> # remember
> if(DEFINED CPACK_NSIS_DISPLAY_NAME)
>   SET(CPACK_NSIS_DISPLAY_NAME_SET TRUE)
> endif()
> cpack_set_if_not_set(CPACK_NSIS_DISPLAY_NAME 
> "${CPACK_PACKAGE_INSTALL_DIRECTORY}")
> 
> # 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
> if(CPACK_NSIS_DISPLAY_NAME_SET)
>   cpack_set_if_not_set(CPACK_NSIS_PACKAGE_NAME 
> "${CPACK_NSIS_DISPLAY_NAME}")
> else()
>   cpack_set_if_not_set(CPACK_NSIS_PACKAGE_NAME 
> "${CPACK_PACKAGE_INSTALL_DIRECTORY}")
> endif()
> 
> 
> That should keep it working like it did for 2.6 right?  It works for 
> your case, no longer crashes.
> 
I made this commit:


RCS file: /cvsroot/CMake/CMake/Modules/CPack.cmake,v
retrieving revision 1.46
diff -r1.46 CPack.cmake
796c796,803
<
---
 > # 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
798c805,812
< 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()

hoffman at CORRIN ~/My Builds/CMake/Modules
$ cvs commit -m "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." CPack.cmake
Committer: Bill Hoffman <bill.hoffman at kitware.com>
/cvsroot/CMake/CMake/Modules/CPack.cmake,v  <--  CPack.cmake
new revision: 1.47; previous revision: 1.46


I am most likely going to push this fix onto 2.8 branch tomorrow if the 
dashboards look good tonight.  If anyone sees and issue with this fix 
please let me know!

Thanks.

-Bill


More information about the CMake mailing list