cmFindLibraryCommand.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*=========================================================================
  2. Program: Insight Segmentation & Registration Toolkit
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2000 National Library of Medicine
  8. All rights reserved.
  9. See COPYRIGHT.txt for copyright details.
  10. =========================================================================*/
  11. #ifndef cmFindLibraryCommand_h
  12. #define cmFindLibraryCommand_h
  13. #include "cmStandardIncludes.h"
  14. #include "cmCommand.h"
  15. /** \class cmFindLibraryCommand
  16. * \brief Define a command to search for a library.
  17. *
  18. * cmFindLibraryCommand is used to define a CMake variable
  19. * that specifies a library. The command searches for a given
  20. * file in a list of directories.
  21. */
  22. class cmFindLibraryCommand : public cmCommand
  23. {
  24. public:
  25. /**
  26. * This is a virtual constructor for the command.
  27. */
  28. virtual cmCommand* Clone()
  29. {
  30. return new cmFindLibraryCommand;
  31. }
  32. /**
  33. * This is called when the command is first encountered in
  34. * the CMakeLists.txt file.
  35. */
  36. virtual bool Invoke(std::vector<std::string>& args);
  37. /**
  38. * This determines if the command gets propagated down
  39. * to makefiles located in subdirectories.
  40. */
  41. virtual bool IsInherited() {return true;}
  42. /**
  43. * The name of the command as specified in CMakeList.txt.
  44. */
  45. virtual const char* GetName() {return "FIND_LIBRARY";}
  46. /**
  47. * Succinct documentation.
  48. */
  49. virtual const char* GetTerseDocumentation()
  50. {
  51. return "Find a library.";
  52. }
  53. /**
  54. * More documentation.
  55. */
  56. virtual const char* GetFullDocumentation()
  57. {
  58. return
  59. "FIND_LIBRARY(DEFINE_PATH libraryName path1 path2 path3...)\n"
  60. "If the library is found, then DEFINE_PATH is set to the path where it was found";
  61. }
  62. cmTypeMacro(cmFindLibraryCommand, cmCommand);
  63. };
  64. #endif