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 cmFindPathCommand_h
13 #define cmFindPathCommand_h
15 #include "cmFindBase.h"
18 /** \class cmFindPathCommand
19 * \brief Define a command to search for a library.
21 * cmFindPathCommand is used to define a CMake variable
22 * that specifies a library. The command searches for a given
23 * file in a list of directories.
25 class cmFindPathCommand : public cmFindBase
30 * This is a virtual constructor for the command.
32 virtual cmCommand* Clone()
34 return new cmFindPathCommand;
38 * This is called when the command is first encountered in
39 * the CMakeLists.txt file.
41 virtual bool InitialPass(std::vector<std::string> const& args,
42 cmExecutionStatus &status);
45 * This determines if the command is invoked when in script mode.
47 virtual bool IsScriptable() const { return true; }
50 * The name of the command as specified in CMakeList.txt.
52 virtual const char* GetName() const {return "find_path";}
55 * Succinct documentation.
57 virtual const char* GetTerseDocumentation() const
59 return "Find the directory containing a file.";
62 cmTypeMacro(cmFindPathCommand, cmFindBase);
63 bool IncludeFileInPath;
65 virtual void GenerateDocumentation();
67 std::string FindHeaderInFramework(std::string const& file,
68 std::string const& dir);
69 std::string FindHeader();
70 std::string FindNormalHeader();
71 std::string FindFrameworkHeader();