[CMake] Correct syntax for CPACK_NSIS_CREATE_ICONS
Droscy
droscy85 at yahoo.it
Tue Apr 13 11:23:09 EDT 2010
Hi, probably you need to escape the backslashes 3 times, because when
cmake passes the option to cpack, it removes one escape, and cpack does
the same when creating nsis file. And you can also use single quote mark
in order to get the quotation on the final nsis file.
So your command should be
set(CPACK_NSIS_CREATE_ICONS "CreateShortCut
'\$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\${PROJECT_NAME}.lnk'
'\$INSTDIR\\\\${PROJECT_NAME}.exe'")
A similar command that I use is
set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "CreateShortcut
'$desktop\\\\${PROJECT_NAME}.lnk' '$instdir\\\\bin\\\\${PROJECT_NAME}.exe'")
and it works correctly.
I hope this can help you, bye
Droscy
More information about the CMake
mailing list