cmUseMangledMesaCommand.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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., Insight Consortium. 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 cmUseMangledMesaCommand_h
  14. #define cmUseMangledMesaCommand_h
  15. #include "cmCommand.h"
  16. #include "cmSourceFile.h"
  17. /** \class cmUseMangledMesaCommand
  18. * \brief Create Tcl Wrappers for VTK classes.
  19. *
  20. * cmUseMangledMesaCommand is used to define a CMake variable include
  21. * path location by specifying a file and list of directories.
  22. */
  23. class cmUseMangledMesaCommand : public cmCommand
  24. {
  25. public:
  26. /**
  27. * This is a virtual constructor for the command.
  28. */
  29. virtual cmCommand* Clone()
  30. {
  31. return new cmUseMangledMesaCommand;
  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 "USE_MANGLED_MESA";}
  42. /**
  43. * Succinct documentation.
  44. */
  45. virtual const char* GetTerseDocumentation()
  46. {
  47. return "Copy mesa headers for use in combination with system GL.";
  48. }
  49. /**
  50. * More documentation.
  51. */
  52. virtual const char* GetFullDocumentation()
  53. {
  54. return
  55. " USE_MANGLED_MESA(PATH_TO_MESA OUTPUT_DIRECTORY)\n"
  56. "The path to mesa includes, should contain gl_mangle.h. "
  57. "The mesa headers are copied to the specified output directory. "
  58. "This allows mangled mesa headers to override other GL headers by "
  59. "being added to the include directory path earlier.";
  60. }
  61. protected:
  62. void CopyAndFullPathMesaHeader(const char* source,
  63. const char* outdir);
  64. private:
  65. std::vector<cmSourceFile> m_WrapClasses;
  66. std::vector<std::string> m_WrapHeaders;
  67. std::string m_LibraryName;
  68. std::string m_SourceList;
  69. std::vector<std::string> m_Commands;
  70. };
  71. #endif