1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
8 This software is distributed WITHOUT ANY WARRANTY; without even the
9 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License for more information.
11 ============================================================================*/
12 #ifndef cmUseMangledMesaCommand_h
13 #define cmUseMangledMesaCommand_h
15 #include "cmCommand.h"
17 #include "cmSourceFile.h"
19 /** \class cmUseMangledMesaCommand
20 * \brief Create Tcl Wrappers for VTK classes.
22 * cmUseMangledMesaCommand is used to define a CMake variable include
23 * path location by specifying a file and list of directories.
25 class cmUseMangledMesaCommand : public cmCommand
28 cmTypeMacro(cmUseMangledMesaCommand, cmCommand);
31 * This is a virtual constructor for the command.
33 virtual cmCommand* Clone()
35 return new cmUseMangledMesaCommand;
39 * This is called when the command is first encountered in
40 * the CMakeLists.txt file.
42 virtual bool InitialPass(std::vector<std::string> const& args,
43 cmExecutionStatus &status);
46 * The name of the command as specified in CMakeList.txt.
48 virtual const char* GetName() const { return "use_mangled_mesa";}
51 * Succinct documentation.
53 virtual const char* GetTerseDocumentation() const
55 return "Copy mesa headers for use in combination with system GL.";
61 virtual const char* GetFullDocumentation() const
64 " use_mangled_mesa(PATH_TO_MESA OUTPUT_DIRECTORY)\n"
65 "The path to mesa includes, should contain gl_mangle.h. "
66 "The mesa headers are copied to the specified output directory. "
67 "This allows mangled mesa headers to override other GL headers by "
68 "being added to the include directory path earlier.";
72 * This determines if the command is invoked when in script mode.
74 virtual bool IsScriptable() const { return true; }
76 /** This command is kept for compatibility with older CMake versions. */
77 virtual bool IsDiscouraged() const
83 void CopyAndFullPathMesaHeader(const char* source,