2001-01-11 16:04:28 +03:00
|
|
|
/*=========================================================================
|
|
|
|
|
2002-10-24 02:03:27 +04:00
|
|
|
Program: CMake - Cross-Platform Makefile Generator
|
2001-01-11 16:04:28 +03:00
|
|
|
Module: $RCSfile$
|
|
|
|
Language: C++
|
|
|
|
Date: $Date$
|
|
|
|
Version: $Revision$
|
|
|
|
|
2002-10-24 02:03:27 +04:00
|
|
|
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
|
|
|
|
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
|
2001-04-27 16:01:17 +04:00
|
|
|
|
2002-01-21 23:30:43 +03:00
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even
|
|
|
|
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
PURPOSE. See the above copyright notices for more information.
|
2001-01-11 16:04:28 +03:00
|
|
|
|
|
|
|
=========================================================================*/
|
2001-01-18 19:20:24 +03:00
|
|
|
#ifndef cmFindLibraryCommand_h
|
|
|
|
#define cmFindLibraryCommand_h
|
2001-01-05 19:41:20 +03:00
|
|
|
|
2001-01-18 19:20:24 +03:00
|
|
|
#include "cmCommand.h"
|
2001-01-05 19:41:20 +03:00
|
|
|
|
|
|
|
|
2001-01-18 19:20:24 +03:00
|
|
|
/** \class cmFindLibraryCommand
|
|
|
|
* \brief Define a command to search for a library.
|
2001-01-11 16:04:28 +03:00
|
|
|
*
|
2001-01-18 19:20:24 +03:00
|
|
|
* cmFindLibraryCommand is used to define a CMake variable
|
|
|
|
* that specifies a library. The command searches for a given
|
2001-01-11 16:04:28 +03:00
|
|
|
* file in a list of directories.
|
|
|
|
*/
|
2001-01-18 19:20:24 +03:00
|
|
|
class cmFindLibraryCommand : public cmCommand
|
2001-01-05 19:41:20 +03:00
|
|
|
{
|
|
|
|
public:
|
2001-01-11 16:04:28 +03:00
|
|
|
/**
|
2001-01-18 19:20:24 +03:00
|
|
|
* This is a virtual constructor for the command.
|
2001-01-11 16:04:28 +03:00
|
|
|
*/
|
2001-01-18 19:20:24 +03:00
|
|
|
virtual cmCommand* Clone()
|
2001-01-05 19:41:20 +03:00
|
|
|
{
|
2001-01-18 19:20:24 +03:00
|
|
|
return new cmFindLibraryCommand;
|
2001-01-05 19:41:20 +03:00
|
|
|
}
|
2001-01-11 16:04:28 +03:00
|
|
|
|
|
|
|
/**
|
2001-01-18 19:20:24 +03:00
|
|
|
* This is called when the command is first encountered in
|
2001-01-11 16:04:28 +03:00
|
|
|
* the CMakeLists.txt file.
|
|
|
|
*/
|
2001-09-20 23:08:30 +04:00
|
|
|
virtual bool InitialPass(std::vector<std::string> const& args);
|
2001-01-11 16:04:28 +03:00
|
|
|
|
2004-02-23 06:07:02 +03:00
|
|
|
/**
|
|
|
|
* This determines if the command is invoked when in script mode.
|
|
|
|
*/
|
|
|
|
virtual bool IsScriptable() { return true; }
|
|
|
|
|
2001-01-11 16:04:28 +03:00
|
|
|
/**
|
2001-01-18 19:20:24 +03:00
|
|
|
* The name of the command as specified in CMakeList.txt.
|
2001-01-11 16:04:28 +03:00
|
|
|
*/
|
|
|
|
virtual const char* GetName() {return "FIND_LIBRARY";}
|
2001-01-05 19:41:20 +03:00
|
|
|
|
2001-01-11 16:04:28 +03:00
|
|
|
/**
|
|
|
|
* Succinct documentation.
|
|
|
|
*/
|
2001-01-12 22:35:15 +03:00
|
|
|
virtual const char* GetTerseDocumentation()
|
2001-01-05 19:41:20 +03:00
|
|
|
{
|
2001-01-11 16:04:28 +03:00
|
|
|
return "Find a library.";
|
2001-01-05 19:41:20 +03:00
|
|
|
}
|
|
|
|
|
2001-01-11 16:04:28 +03:00
|
|
|
/**
|
|
|
|
* More documentation.
|
|
|
|
*/
|
2001-01-12 22:35:15 +03:00
|
|
|
virtual const char* GetFullDocumentation()
|
2001-01-05 19:41:20 +03:00
|
|
|
{
|
2001-01-11 16:04:28 +03:00
|
|
|
return
|
2003-11-13 21:51:18 +03:00
|
|
|
" FIND_LIBRARY(<VAR> NAMES name1 [name2 ...]\n"
|
2003-02-15 02:47:16 +03:00
|
|
|
" [PATHS path1 path2 ...]\n"
|
2003-11-13 21:51:18 +03:00
|
|
|
" [DOC \"docstring\"])\n"
|
|
|
|
"Find a library named by one of the names given after the NAMES "
|
2006-01-28 02:20:55 +03:00
|
|
|
"argument. A cache entry named by <VAR> is created "
|
2003-11-13 21:51:18 +03:00
|
|
|
"to store the result. If the library is not found, the result "
|
|
|
|
"will be <VAR>-NOTFOUND. If DOC is specified then the next "
|
|
|
|
"argument is treated as a documentation string for the cache "
|
|
|
|
"entry <VAR>.\n"
|
|
|
|
" FIND_LIBRARY(VAR libraryName [path1 path2 ...])\n"
|
|
|
|
"Find a library with the given name by searching in the specified "
|
|
|
|
"paths. This is a short-hand signature for the command that is "
|
2006-01-28 02:20:55 +03:00
|
|
|
"sufficient in many cases. "
|
|
|
|
"The search proceeds first in paths listed in the CMAKE_LIBRARY_PATH "
|
|
|
|
"CMake variable (which is generally set by the user on the command line), "
|
|
|
|
"then in paths listed in the CMAKE_LIBRARY_PATH environment variable, "
|
|
|
|
"then in paths given to the PATHS option of the command, "
|
|
|
|
"and finally in paths listed in the PATH environment variable.";
|
2001-01-05 19:41:20 +03:00
|
|
|
}
|
2001-02-26 20:07:53 +03:00
|
|
|
|
|
|
|
cmTypeMacro(cmFindLibraryCommand, cmCommand);
|
2001-01-05 19:41:20 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|