#installer rules. 
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Zep Installer")
set(CPACK_PACKAGE_VENDOR "Zep")
set(CPACK_PACKAGE_VERSION ${PROJECT_VER})
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VER_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VER_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VER_PATCH})
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL OFF)
set(CPACK_NSIS_MODIFY_PATH ON)
#if you have an icon set the path here 
# SET(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/my_cool_icon.ico")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Zep\\\\Zep")
set(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\ZepDemo.exe")
set(CPACK_NSIS_DISPLAY_NAME "ZepDemo ${PROJECT_VER}")
#set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/EULA.txt")

# set component installation rules 
set(CPACK_COMPONENT_BINARIES_DISPLAY_NAME "Main application")
set(CPACK_COMPONENT_BINARIES_DESCRIPTION "This will install the main application.")
set(CPACK_COMPONENT_DATA_FILES_DISPLAY_NAME "Data files for this application.")
set(CPACK_COMPONENT_DATA_FILES_DESCRIPTION "This will install random data files.")
set(CPACK_ALL_INSTALL_TYPES Full Upgrade) #set installation types
set(CPACK_COMPONENT_BINARIES_INSTALL_TYPES Full Upgrade)
set(CPACK_COMPONENT_DATA_FILES_INSTALL_TYPES Full)
set(CPACK_COMPONENTS_ALL binaries)
if (CMAKE_CL_64)
	set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
else (CMAKE_CL_64)
	set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES")
endif (CMAKE_CL_64)
include(CPack)
