include(InstallRequiredSystemLibraries)

set(VERSION "trunk")
set(CPACK_PACKAGE_VERSION_MAJOR "0")
set(CPACK_PACKAGE_VERSION_MINOR "0")
set(CPACK_PACKAGE_VERSION_PATCH "0")


SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "hello world")
SET(CPACK_PACKAGE_VENDOR "cryp7.net")

SET(CPACK_PACKAGE_DESCRIPTION_FILE "${PRODUCT_SOURCE_DIR}/README.txt")
SET(CPACK_RESOURCE_FILE_LICENSE "${PRODUCT_SOURCE_DIR}/LICENSE.txt")

if (WIN32)
set(CPACK_GENERATOR ${CPACK_GENERATOR} ZIP)
#set(CPACK_INSTALL_PREFIX "c:/Program Files/${PROJECT_NAME}/")
#set(CPACK_PACKAGE_INSTALL_PREFIX "c:/Program Files/${PROJECT_NAME}/")
#set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}-${VERSION}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}")
set(CPACK_NSIS_MODIFY_PATH ON)
set(CPACK_GENERATOR ${CPACK_GENERATOR} NSIS)
else()
set(CPACK_GENERATOR ${CPACK_GENERATOR} TGZ)
set(CPACK_GENERATOR ${CPACK_GENERATOR} TBZ2)

set(CPACK_RPM_PACKAGE_LICENSE "BSD 3-Clause License")
set(CPACK_RPM_PACKAGE_GROUP "Applications/System")
set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE ${CMAKE_BUILD_ROOT}/include/rpm-post-install.sh)
set(CPACK_GENERATOR ${CPACK_GENERATOR} RPM)
endif()

include(CPack)

#EOF
