INCLUDE (CPackDetectArch) ## CPack configuration ## SET (CPACK_PACKAGE_CONTACT "${CONTACT}") SET (CPACK_PACKAGE_VENDOR "${CONTACT}") SET (CPACK_NSIS_MODIFY_PATH ON) SET (CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON) INCLUDE (InstallRequiredSystemLibraries) SET (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING") SET (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README") INSTALL (FILES "${PROJECT_BINARY_DIR}/pkg-config/${PROJECT_LOWERCASE_NAME}-${MAJOR}.pc" DESTINATION lib/pkgconfig) #SET (CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME}") #SET (CPACK_NSIS_DISPLAY_NAME "${PROJECT_NAME}") SET (CPACK_PACKAGE_VERSION_MAJOR "${MAJOR}") SET (CPACK_PACKAGE_VERSION_MINOR "${MINOR}") SET (CPACK_PACKAGE_VERSION_PATCH "${PATCH}") SET (CPACK_PACKAGE_VERSION "${MAJOR}.${MINOR}.${PATCH}") IF (UNIX) SET (CPACK_GENERATOR "DEB;RPM;STGZ;TBZ2;TGZ;TZ;ZIP") SET (CPACK_SOURCE_GENERATOR "DEB;RPM;STGZ;TBZ2;TGZ;TZ;ZIP") SET (CPACK_PACKAGE_NAME "${PROJECT_LOWERCASE_NAME}") SET (CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION}") SET (CPACK_PACKAGE_DESCRIPTION "${PROJECT_DESCRIPTION}") # Debian specific options SET (CPACK_DEBIAN_PACKAGE_DEPENDS "${DEBIAN_DEPENDENCIES}") SET (CPACK_DEBIAN_PACKAGE_SECTION "${DEBIAN_SECTION}") # SET (CPACK_DEBIAN_PACKAGE_ARCHITECTURE "${ARCHITECTURE}") # SET (CPACK_DEBIAN_PACKAGE_PRIORITY "optional") SET (CPACK_DEBIAN_PACKAGE_RECOMMENDS "") SET (CPACK_DEBIAN_PACKAGE_SUGGESTS "") # RPM specific options # SET (CPACK_RPM_PACKAGE_ARCHITECTURE "${ARCHITECTURE}") SET (CPACK_RPM_PACKAGE_LICENSE "${LICENSE}") SET (CPACK_RPM_PACKAGE_GROUP "${REDHAT_SECTION}") SET (CPACK_RPM_PACKAGE_REQUIRES "${REDHAT_DEPENDENCIES}") SET (CPACK_RPM_PACKAGE_PROVIDES "${PROJECT_LOWERCASE_NAME}") # http://public.kitware.com/Bug/view.php?id=12997 SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${ARCHITECTURE}") ELSEIF (WIN32) SET (CPACK_GENERATOR "NSIS") SET (CPACK_SOURCE_GENERATOR "NSIS") SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CMAKE_PROJECT_NAME}-${MAJOR}") #SET (CPACK_NSIS_MENU_LINKS "${EWS_WEBSITE}" "Homepage for ${EWS_APP_NAME}") #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}") SET (CPACK_PACKAGE_INSTALL_DIRECTORY "${CMAKE_PROJECT_NAME}-${MAJOR}") SET (CPACK_UNINSTALL_NAME "${WIN32_UNINSTALL_NAME}-${MAJOR}") # <=10 symbols: https://redmine.backbone.ws/issues/83 ENDIF () INCLUDE (CPack)