cmCPackNuGetGenerator.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #pragma once
  4. #include "cmCPackGenerator.h"
  5. /** \class cmCPackNuGetGenerator
  6. * \brief A generator for RPM packages
  7. */
  8. class cmCPackNuGetGenerator : public cmCPackGenerator
  9. {
  10. public:
  11. cmCPackTypeMacro(cmCPackNuGetGenerator, cmCPackGenerator);
  12. // NOTE In fact, it is possible to have NuGet not only for Windows...
  13. // https://docs.microsoft.com/en-us/nuget/install-nuget-client-tools
  14. static bool CanGenerate() { return true; }
  15. protected:
  16. bool SupportsComponentInstallation() const override;
  17. int PackageFiles() override;
  18. const char* GetOutputExtension() override { return ".nupkg"; }
  19. bool SupportsAbsoluteDestination() const override { return false; }
  20. /**
  21. * The method used to prepare variables when component
  22. * install is used.
  23. */
  24. void SetupGroupComponentVariables(bool ignoreGroup);
  25. /**
  26. * Populate \c packageFileNames vector of built packages.
  27. */
  28. void AddGeneratedPackageNames();
  29. };