cmCPackComponentGroup.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #ifndef cmCPackComponentGroup_h
  14. #define cmCPackComponentGroup_h
  15. #include <map>
  16. #include <string>
  17. #include <vector>
  18. class cmCPackComponentGroup;
  19. /** \class cmCPackInstallationType
  20. * \brief A certain type of installation, which encompasses a
  21. * set of components.
  22. */
  23. class cmCPackInstallationType
  24. {
  25. public:
  26. /// The name of the installation type (used to reference this
  27. /// installation type).
  28. std::string Name;
  29. /// The name of the installation type as displayed to the user.
  30. std::string DisplayName;
  31. /// The index number of the installation type. This is an arbitrary
  32. /// numbering from 1 to the number of installation types.
  33. unsigned Index;
  34. };
  35. /** \class cmCPackComponent
  36. * \brief A single component to be installed by CPack.
  37. */
  38. class cmCPackComponent
  39. {
  40. public:
  41. cmCPackComponent() : Group(0) { }
  42. /// The name of the component (used to reference the component).
  43. std::string Name;
  44. /// The name of the component as displayed to the user.
  45. std::string DisplayName;
  46. /// The component group that contains this component (if any).
  47. cmCPackComponentGroup *Group;
  48. /// Whether this component group must always be installed.
  49. bool IsRequired : 1;
  50. /// Whether this component group is hidden. A hidden component group
  51. /// is always installed. However, it may still be shown to the user.
  52. bool IsHidden : 1;
  53. /// Whether this component defaults to "disabled".
  54. bool IsDisabledByDefault : 1;
  55. /// A description of this component.
  56. std::string Description;
  57. /// The installation types that this component is a part of.
  58. std::vector<cmCPackInstallationType *> InstallationTypes;
  59. /// The components that this component depends on.
  60. std::vector<cmCPackComponent *> Dependencies;
  61. /// The components that depend on this component.
  62. std::vector<cmCPackComponent *> ReverseDependencies;
  63. /// The list of installed files that are part of this component.
  64. std::vector<std::string> Files;
  65. /// The list of installed directories that are part of this component.
  66. std::vector<std::string> Directories;
  67. };
  68. /** \class cmCPackComponentGroup
  69. * \brief A component group to be installed by CPack.
  70. */
  71. class cmCPackComponentGroup
  72. {
  73. public:
  74. /// The name of the group (used to reference the group).
  75. std::string Name;
  76. /// The name of the component as displayed to the user.
  77. std::string DisplayName;
  78. /// The description of this component group.
  79. std::string Description;
  80. /// Whether the name of the component will be shown in bold.
  81. bool IsBold : 1;
  82. /// Whether the section should be expanded by default
  83. bool IsExpandedByDefault : 1;
  84. /// The components within this group.
  85. std::vector<cmCPackComponent*> Components;
  86. };
  87. #endif