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
|
|
|
|
|
|
|
#include "cmStandardIncludes.h"
|
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
|
|
|
|
|
|
|
/**
|
2001-01-18 19:20:24 +03:00
|
|
|
* This determines if the command gets propagated down
|
2001-01-11 16:04:28 +03:00
|
|
|
* to makefiles located in subdirectories.
|
|
|
|
*/
|
2002-04-12 01:02:10 +04:00
|
|
|
virtual bool IsInherited() {return false;}
|
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
|
2002-05-12 19:31:12 +04:00
|
|
|
"FIND_LIBRARY(DEFINE_PATH libraryName [NAMES name1 name2 name3...] [PATHS path1 path2 path3...] [DOC docstring] )\n"
|
2001-11-27 02:24:47 +03:00
|
|
|
"If the library is found, then DEFINE_PATH is set to the full path where it was found. "
|
|
|
|
"If DOC is specified the next argument is the "
|
|
|
|
"documentation string for the cache entry NAME.";
|
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
|