cmInstallFilesCommand.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*=========================================================================
  2. Program: Insight Segmentation & Registration Toolkit
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Insight Consortium. All rights reserved.
  8. See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm 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 cmInstallFilesCommand_h
  14. #define cmInstallFilesCommand_h
  15. #include "cmStandardIncludes.h"
  16. #include "cmCommand.h"
  17. /** \class cmInstallFilesCommand
  18. * \brief Specifies where to install some files
  19. *
  20. * cmInstallFilesCommand specifies the relative path where a list of
  21. * files should be installed.
  22. */
  23. class cmInstallFilesCommand : public cmCommand
  24. {
  25. public:
  26. /**
  27. * This is a virtual constructor for the command.
  28. */
  29. virtual cmCommand* Clone()
  30. {
  31. return new cmInstallFilesCommand;
  32. }
  33. /**
  34. * This is called when the command is first encountered in
  35. * the CMakeLists.txt file.
  36. */
  37. virtual bool InitialPass(std::vector<std::string> const& args);
  38. /**
  39. * The name of the command as specified in CMakeList.txt.
  40. */
  41. virtual const char* GetName() { return "INSTALL_FILES";}
  42. /**
  43. * Succinct documentation.
  44. */
  45. virtual const char* GetTerseDocumentation()
  46. {
  47. return "Create install rules for files";
  48. }
  49. /**
  50. * This is called at the end after all the information
  51. * specified by the command is accumulated. Most commands do
  52. * not implement this method. At this point, reading and
  53. * writing to the cache can be done.
  54. */
  55. virtual void FinalPass();
  56. /**
  57. * More documentation.
  58. */
  59. virtual const char* GetFullDocumentation()
  60. {
  61. return
  62. "INSTALL_FILES(path extension file file ...)\n"
  63. "INSTALL_FILES(path regexp)\n"
  64. "Create rules to install the listed files into the path. Path is relative to the variable CMAKE_INSTALL_PREFIX. There are two forms for this command. In the first the files can be specified explicitly. If a file specified already has an extension, that extension will be removed first. This is useful for providing lists of source files such as foo.cxx when you want the corresponding foo.h to be installed. A typical extension is .h etc... In the second form any files in the current directory that match the regular expression will be installed.";
  65. }
  66. cmTypeMacro(cmInstallFilesCommand, cmCommand);
  67. private:
  68. std::string m_TargetName;
  69. std::vector<std::string> m_FinalArgs;
  70. };
  71. #endif