list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
list(REMOVE_DUPLICATES CMAKE_MODULE_PATH)

set(CPACK_PACKAGE_CONTACT "https://github.com/FloopCZ/tensorflow_cc")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "TensorFlow C++ API through CMake")
if(DEFINED ENV{TF_CUDA_COMPUTE_CAPABILITIES})
  set(CPACK_PACKAGE_DESCRIPTION "CUDA compute capabilities: $ENV{TF_CUDA_COMPUTE_CAPABILITIES}")
endif()

set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}")
set(CPACK_PACKAGE_VENDOR "https://github.com/FloopCZ/tensorflow_cc")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/../LICENSE")
set(CPACK_VERBATIM_VARIABLES TRUE)

set(CPACK_DEBIAN_PACKAGE_PROVIDES  "${PROJECT_NAME}")
set(CPACK_DEBIAN_PACKAGE_CONFLICTS "${PROJECT_NAME}")
set(CPACK_DEBIAN_PACKAGE_REPLACES  "${PROJECT_NAME}")

#set(CPACK_DEBIAN_PACKAGE_DEPENDS )
set(CPACK_DEBIAN_PACKAGE_RECOMMENDS "cuda-toolkit-10-1")

set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/FloopCZ/tensorflow_cc")
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
set(CPACK_DEBIAN_PACKAGE_VERSION "${${PROJECT_NAME}_VERSION}")
set(CPACK_DEBIAN_PACKAGE_RELEASE "0")
set(CPACK_DEBIAN_PACKAGE_SECTION "libs")
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION
"${CPACK_PACKAGE_DESCRIPTION_SUMMARY}.
 ${CPACK_PACKAGE_DESCRIPTION}"
)

set(CPACK_GENERATOR "DEB")

include(CPack)
