set(CPACK_PACKAGE_VENDOR "Wohlstand")
set(CPACK_PACKAGE_CONTACT "admin@wohlnet.ru")
set(CPACK_PACKAGE_VERSION "${THEXTECH_VERSION_STRING}")

if(APPLE)
    set(CPACK_PACKAGE_NAME "${THEXTECH_BUNDLE_NAME}")
    set(CPACK_GENERATOR "DragNDrop")
    set(CPACK_PACKAGE_VERSION "${THEXTECH_VERSION_STRING}")
    set(CPACK_DMG_FORMAT "UDBZ")
    set(CPACK_DMG_VOLUME_NAME "${THEXTECH_BUNDLE_NAME}")
    if(NOT CPACK_PACKAGE_FILE_NAME)
        set(CPACK_PACKAGE_FILE_NAME "${THEXTECH_BUNDLE_NAME}-${THEXTECH_VERSION_STRING}")
    endif()
    include(CPack)
endif()

if(UNIX AND NOT APPLE)
    set(CPACK_PACKAGE_NAME "${THEXTECH_PACKAGE_NAME}")
    set(CPACK_GENERATOR "TBZ2")
    if(NOT CPACK_PACKAGE_FILE_NAME)
        set(CPACK_PACKAGE_FILE_NAME "${THEXTECH_PACKAGE_NAME}-${THEXTECH_VERSION_STRING}")
    endif()
    include(CPack)
endif()

if(WIN32)
    set(CPACK_PACKAGE_NAME "${THEXTECH_PACKAGE_NAME}")
    set(CPACK_GENERATOR "7Z")
    set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
    if(NOT CPACK_PACKAGE_FILE_NAME)
        set(CPACK_PACKAGE_FILE_NAME "${THEXTECH_PACKAGE_NAME}-${THEXTECH_VERSION_STRING}")
    endif()
    include(CPack)
endif()

