cmFindPathCommand.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #ifndef cmFindPathCommand_h
  4. #define cmFindPathCommand_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include <string>
  7. #include <vector>
  8. #include "cmFindBase.h"
  9. class cmCommand;
  10. class cmExecutionStatus;
  11. /** \class cmFindPathCommand
  12. * \brief Define a command to search for a library.
  13. *
  14. * cmFindPathCommand is used to define a CMake variable
  15. * that specifies a library. The command searches for a given
  16. * file in a list of directories.
  17. */
  18. class cmFindPathCommand : public cmFindBase
  19. {
  20. public:
  21. cmFindPathCommand();
  22. /**
  23. * This is a virtual constructor for the command.
  24. */
  25. cmCommand* Clone() override { return new cmFindPathCommand; }
  26. /**
  27. * This is called when the command is first encountered in
  28. * the CMakeLists.txt file.
  29. */
  30. bool InitialPass(std::vector<std::string> const& args,
  31. cmExecutionStatus& status) override;
  32. bool IncludeFileInPath;
  33. private:
  34. std::string FindHeaderInFramework(std::string const& file,
  35. std::string const& dir);
  36. std::string FindHeader();
  37. std::string FindNormalHeader();
  38. std::string FindFrameworkHeader();
  39. };
  40. #endif