# Packaging procedures of TBPLaS.
# Must be included by main CMakeLists.txt after all the settings.

# Basic package info
set(CPACK_PACKAGE_NAME "${TBPLAS_PROJECT_NAME}")
set(CPACK_PACKAGE_HOMEPAGE_URL "${TBPLAS_HOMEPAGE}")
set(CPACK_PACKAGE_DESCRIPTION "${TBPLAS_DESCRIPTION}")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/README.md")
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE.rst")
set(CPACK_PACKAGE_VENDOR "${TBPLAS_VENDOR}")

# Version info
set(CPACK_PACKAGE_VERSION_MAJOR "${TBPLAS_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${TBPLAS_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${TBPLAS_VERSION_PATCH}")

# Packaging info
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${TBPLAS_PROJECT_NAME}-${TBPLAS_VERSION_FULL}")
set(CPACK_SOURCE_IGNORE_FILES "/.cache/;/.idea/;/.vscode/;${PROJECT_BINARY_DIR};/cmake-build-gcc-debug/;.clang-tidy;.clangd;.gitignore;/.git/;")
set(CPACK_SOURCE_GENERATOR "TGZ;TBZ2")

# Must comes in the end of the file
include(CPack)
