我在CMake 2.8.1中使用NSIS包生成器来分发Qt应用程序.一切正常工作,除了使用CPACK_CREATE_DESKTOP_LINKS创建桌面链接到应用程序.
原文链接:https://www.f2er.com/windows/363861.html我已经看过CMake source(包括它自己的“bootstrap”Windows的安装定义),据我所知,我在做同样的事情.
以下是我的CMakeLists.txt文件的相关部分.
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}")
任何想法或调试提示是赞赏!