Creating Windows Desktop Icon in CMake + CPack + NSIS
- by Simeon Fitch
I'm using NSIS package generator in CMake 2.8.1 to distribute a Qt application. Everything is working fine... except the use of CPACK_CREATE_DESKTOP_LINKS to create a desktop link to the application.
I've looked through the CMake source (including it's own "bootstrap" installation definition for windows), and as far as I can tell I'm doing the same thing.
Here's the relevant section of my CMakeLists.txt file.
set(CPACK_GENERATOR NSIS)
set(CPACK_NSIS_PACKAGE_NAME "${EWS_APP_NAME}")
set(CPACK_NSIS_DISPLAY_NAME "${EWS_APP_NAME}")
set(CPACK_NSIS_CONTACT "${EWS_EMAIL}")
set(CPACK_PACKAGE_EXECUTABLES "${EXE_TARGET_NAME}" "${EWS_APP_NAME}")
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CMAKE_PROJECT_NAME}-${EWS_VERSION}")
# this works
set(CPACK_NSIS_MENU_LINKS "${EWS_WEBSITE}" "Homepage for ${EWS_APP_NAME}")
# this doesn't
set(CPACK_CREATE_DESKTOP_LINKS "${EXE_TARGET_NAME}")
# Icon in the add/remove control panel. Must be an .exe file
set(CPACK_NSIS_INSTALLED_ICON_NAME bin\\\\${EXE_TARGET_NAME}.exe)
set(CPACK_NSIS_URL_INFO_ABOUT "${EWS_WEBSITE}")
set(CPACK_NSIS_HELP_LINK "${EWS_WEBSITE}")
Any ideas or debugging tips are appreciated!