1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmFindLibraryCommand.h,v $
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
33 cmFindLibraryCommand();
35 * This is a virtual constructor for the command.
37 virtual cmCommand
* Clone()
39 return new cmFindLibraryCommand
;
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
);
50 * This determines if the command is invoked when in script mode.
52 virtual bool IsScriptable() { return true; }
55 * The name of the command as specified in CMakeList.txt.
57 virtual const char* GetName() {return "find_library";}
60 * Succinct documentation.
62 virtual const char* GetTerseDocumentation()
64 return "Find a library.";
66 cmTypeMacro(cmFindLibraryCommand
, cmFindBase
);
69 void AddArchitecturePaths(const char* suffix
);
71 std::string
FindLibrary();
73 std::string
FindNormalLibrary();
74 std::string
FindFrameworkLibrary();