cmCPackArchiveGenerator.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc.
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmCPackArchiveGenerator_h
  11. #define cmCPackArchiveGenerator_h
  12. #include "cmCPackGenerator.h"
  13. /** \class cmCPackArchiveGenerator
  14. * \brief A generator base for libarchive generation
  15. *
  16. */
  17. class cmCPackArchiveGenerator : public cmCPackGenerator
  18. {
  19. public:
  20. enum CompressType{ GZIP, BZIP2, COMPRESS, LZMA, NONE};
  21. enum ArchiveType{ TAR, ZIP};
  22. cmTypeMacro(cmCPackArchiveGenerator, cmCPackGenerator);
  23. /**
  24. * Construct generator
  25. */
  26. cmCPackArchiveGenerator(CompressType, ArchiveType);
  27. virtual ~cmCPackArchiveGenerator();
  28. // Used to add a header to the archive
  29. virtual int GenerateHeader(std::ostream* os);
  30. protected:
  31. virtual int InitializeInternal();
  32. int PackageFiles();
  33. virtual const char* GetOutputExtension() = 0;
  34. CompressType Compress;
  35. ArchiveType Archive;
  36. };
  37. #endif