
if(MSVC)
set(CPACK_GENERATOR "NSIS64")
else()
set(CPACK_GENERATOR "DEB;RPM")
endif(MSVC)


SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "ECOIN-QT")
SET(CPACK_PACKAGE_VENDOR "ecoin")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")

if(WIN32)
	SET(CPACK_PACKAGE_INSTALL_DIRECTORY "ecoin")
else()
	SET(CPACK_PACKAGE_INSTALL_DIRECTORY "/")
endif()

IF(WIN32 AND NOT UNIX)
  # There is a bug in NSI that does not handle full unix paths properly. Make
  # sure there is at least one set of four (4) backlasshes.
  SET(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/src/qt/res/icons/bitcoin.ico")
  SET(CPACK_NSIS_INSTALLED_ICON_NAME "ecoin-qt.exe")
  SET(CPACK_NSIS_DISPLAY_NAME "ECOIN-QT")
  SET(CPACK_NSIS_HELP_LINK "https://www.coinyee.io")
  SET(CPACK_NSIS_URL_INFO_ABOUT "https://www.coinyee.io")
  SET(CPACK_NSIS_CONTACT "microcaicai@gmail.com")
  SET(CPACK_NSIS_MODIFY_PATH ON)
ELSE(WIN32 AND NOT UNIX)
  SET(CPACK_STRIP_FILES "ecoin")
  SET(CPACK_SOURCE_STRIP_FILES "")
ENDIF(WIN32 AND NOT UNIX)
SET(CPACK_PACKAGE_EXECUTABLES "ecoin-qt" "ecoin-qt")
set(CPACK_CREATE_DESKTOP_LINKS "ecoin-qt")

SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "mosir") #required

SET(CPACK_SOURCE_IGNORE_FILES "${CPACK_SOURCE_IGNORE_FILES};${CMAKE_CURRENT_BINARY_DIR};\\\\.git;\\\\.kdev.*;\\\\.travis\\\\.yml")

set(CPACK_NSIS_MUI_FINISHPAGE_RUN "ecoin-qt.exe")
set(CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP "${CMAKE_CURRENT_SOURCE_DIR}\\\\src\\\\qt\\\\res\\\\setup_wellcomepage.bmp")
