CMake/Source/cmFindLibraryCommand.h

85 lines
2.3 KiB
C
Raw Normal View History

2001-01-11 13:04:28 +00:00
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
2002-01-21 20:30:43 +00:00
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
2001-04-27 12:01:17 +00:00
2002-01-21 20:30:43 +00: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 13:04:28 +00:00
=========================================================================*/
2001-01-18 16:20:24 +00:00
#ifndef cmFindLibraryCommand_h
#define cmFindLibraryCommand_h
#include "cmStandardIncludes.h"
2001-01-18 16:20:24 +00:00
#include "cmCommand.h"
2001-01-18 16:20:24 +00:00
/** \class cmFindLibraryCommand
* \brief Define a command to search for a library.
2001-01-11 13:04:28 +00:00
*
2001-01-18 16:20:24 +00:00
* cmFindLibraryCommand is used to define a CMake variable
* that specifies a library. The command searches for a given
2001-01-11 13:04:28 +00:00
* file in a list of directories.
*/
2001-01-18 16:20:24 +00:00
class cmFindLibraryCommand : public cmCommand
{
public:
2001-01-11 13:04:28 +00:00
/**
2001-01-18 16:20:24 +00:00
* This is a virtual constructor for the command.
2001-01-11 13:04:28 +00:00
*/
2001-01-18 16:20:24 +00:00
virtual cmCommand* Clone()
{
2001-01-18 16:20:24 +00:00
return new cmFindLibraryCommand;
}
2001-01-11 13:04:28 +00:00
/**
2001-01-18 16:20:24 +00:00
* This is called when the command is first encountered in
2001-01-11 13:04:28 +00:00
* the CMakeLists.txt file.
*/
virtual bool InitialPass(std::vector<std::string> const& args);
2001-01-11 13:04:28 +00:00
/**
2001-01-18 16:20:24 +00:00
* This determines if the command gets propagated down
2001-01-11 13:04:28 +00:00
* to makefiles located in subdirectories.
*/
2002-04-11 21:02:10 +00:00
virtual bool IsInherited() {return false;}
2001-01-11 13:04:28 +00:00
/**
2001-01-18 16:20:24 +00:00
* The name of the command as specified in CMakeList.txt.
2001-01-11 13:04:28 +00:00
*/
virtual const char* GetName() {return "FIND_LIBRARY";}
2001-01-11 13:04:28 +00:00
/**
* Succinct documentation.
*/
2001-01-12 19:35:15 +00:00
virtual const char* GetTerseDocumentation()
{
2001-01-11 13:04:28 +00:00
return "Find a library.";
}
2001-01-11 13:04:28 +00:00
/**
* More documentation.
*/
2001-01-12 19:35:15 +00:00
virtual const char* GetFullDocumentation()
{
2001-01-11 13:04:28 +00:00
return
2002-05-12 15:31:12 +00:00
"FIND_LIBRARY(DEFINE_PATH libraryName [NAMES name1 name2 name3...] [PATHS path1 path2 path3...] [DOC docstring] )\n"
"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.";
}
cmTypeMacro(cmFindLibraryCommand, cmCommand);
};
#endif