#
# CPack configuration to create packages
#
set(CPACK_PACKAGE_VERSION_MAJOR ${VITE_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${VITE_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${VITE_VERSION_PATCH})
set(CPACK_SOURCE_GENERATOR "TBZ2")
set(CPACK_SOURCE_PACKAGE_FILE_NAME
  "${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")

SET(CPACK_SOURCE_IGNORE_FILES
  /\\\\.svn/
  ~$
  CMakeCache\\\\.txt
  cmake_dist\\\\.cmake
  CPackSourceConfig\\\\.cmake
  CPackConfig.cmake
  /cmake_install\\\\.cmake
  /CTestTestfile\\\\.cmake
  /CMakeFiles/
  /_CPack_Packages/
  $\\\\.gz
  $\\\\.zip
  /CMakeFiles/
  /_CPack_Packages/
  Makefile$
  ${CPACK_SOURCE_IGNORE_FILES}
)

include(CPack)

add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)

