cmUseMangledMesaCommand.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  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 cmUseMangledMesaCommand_h
  11. #define cmUseMangledMesaCommand_h
  12. #include "cmCommand.h"
  13. #include "cmSourceFile.h"
  14. /** \class cmUseMangledMesaCommand
  15. * \brief Create Tcl Wrappers for VTK classes.
  16. *
  17. * cmUseMangledMesaCommand is used to define a CMake variable include
  18. * path location by specifying a file and list of directories.
  19. */
  20. class cmUseMangledMesaCommand : public cmCommand
  21. {
  22. public:
  23. cmTypeMacro(cmUseMangledMesaCommand, cmCommand);
  24. /**
  25. * This is a virtual constructor for the command.
  26. */
  27. virtual cmCommand* Clone()
  28. {
  29. return new cmUseMangledMesaCommand;
  30. }
  31. /**
  32. * This is called when the command is first encountered in
  33. * the CMakeLists.txt file.
  34. */
  35. virtual bool InitialPass(std::vector<std::string> const& args,
  36. cmExecutionStatus &status);
  37. /**
  38. * The name of the command as specified in CMakeList.txt.
  39. */
  40. virtual const char* GetName() { return "use_mangled_mesa";}
  41. /**
  42. * Succinct documentation.
  43. */
  44. virtual const char* GetTerseDocumentation()
  45. {
  46. return "Copy mesa headers for use in combination with system GL.";
  47. }
  48. /**
  49. * More documentation.
  50. */
  51. virtual const char* GetFullDocumentation()
  52. {
  53. return
  54. " use_mangled_mesa(PATH_TO_MESA OUTPUT_DIRECTORY)\n"
  55. "The path to mesa includes, should contain gl_mangle.h. "
  56. "The mesa headers are copied to the specified output directory. "
  57. "This allows mangled mesa headers to override other GL headers by "
  58. "being added to the include directory path earlier.";
  59. }
  60. /** This command is kept for compatibility with older CMake versions. */
  61. virtual bool IsDiscouraged()
  62. {
  63. return true;
  64. }
  65. protected:
  66. void CopyAndFullPathMesaHeader(const char* source,
  67. const char* outdir);
  68. };
  69. #endif