STYLE: Nightly Date Stamp
[cmake.git] / Source / cmFindLibraryCommand.h
blob8977753920d4e865717610b244315934cf68681d
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmFindLibraryCommand.h,v $
5 Language: C++
6 Date: $Date: 2008-06-09 15:58:29 $
7 Version: $Revision: 1.28 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #ifndef cmFindLibraryCommand_h
18 #define cmFindLibraryCommand_h
20 #include "cmFindBase.h"
23 /** \class cmFindLibraryCommand
24 * \brief Define a command to search for a library.
26 * cmFindLibraryCommand is used to define a CMake variable
27 * that specifies a library. The command searches for a given
28 * file in a list of directories.
30 class cmFindLibraryCommand : public cmFindBase
32 public:
33 cmFindLibraryCommand();
34 /**
35 * This is a virtual constructor for the command.
37 virtual cmCommand* Clone()
39 return new cmFindLibraryCommand;
42 /**
43 * This is called when the command is first encountered in
44 * the CMakeLists.txt file.
46 virtual bool InitialPass(std::vector<std::string> const& args,
47 cmExecutionStatus &status);
49 /**
50 * This determines if the command is invoked when in script mode.
52 virtual bool IsScriptable() { return true; }
54 /**
55 * The name of the command as specified in CMakeList.txt.
57 virtual const char* GetName() {return "find_library";}
59 /**
60 * Succinct documentation.
62 virtual const char* GetTerseDocumentation()
64 return "Find a library.";
66 cmTypeMacro(cmFindLibraryCommand, cmFindBase);
68 protected:
69 void AddArchitecturePaths(const char* suffix);
70 void AddLib64Paths();
71 std::string FindLibrary();
72 private:
73 std::string FindNormalLibrary();
74 std::string FindFrameworkLibrary();
79 #endif