# PACKAGING

macro(CCT_PACK)

set(CPACK_GENERATOR NSIS)
#set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
set(CPACK_PACKAGE_NAME "${CCT_PROJECT_NAME}")
set(CPACK_PACKAGE_VENDOR "${CCT_PRODUCT_VENDOR}")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${CCT_PROJECT_DESCRIPTION}")
set(CPACK_PACKAGE_VERSION "${${CCT_PROJECT_NAME}_VERSION}")
set(CPACK_PACKAGE_VERSION_MAJOR "${${CCT_PROJECT_NAME}_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${${CCT_PROJECT_NAME}_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${${CCT_PROJECT_NAME}_VERSION_PATCH}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CCT_PROJECT_NAME}-v${CPACK_PACKAGE_VERSION}-${CCT_PROJECT_GIT_HASH})
set(CPACK_PACKAGE_FILE_NAME ${CCT_PROJECT_NAME}-v${CPACK_PACKAGE_VERSION}-${CCT_PROJECT_GIT_HASH})
set(CPACK_RESOURCE_FILE_LICENSE ${CCT_PRODUCT_LICENCE})
set(CPACK_NSIS_MUI_ICON ${CCT_PRODUCT_LOGO})
set(CPACK_NSIS_INSTALLED_ICON_NAME bin/${CCT_PROJECT_NAME}.exe)
SET(CPACK_NSIS_MODIFY_PATH ON)
set(CPACK_NSIS_DEFINES "RequestExecutionLevel user")

INCLUDE(CPack)

endmacro()
