cmLinkDirectoriesCommand.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmLinkDirectoriesCommand_h
  11. #define cmLinkDirectoriesCommand_h
  12. #include "cmCommand.h"
  13. /** \class cmLinkDirectoriesCommand
  14. * \brief Define a list of directories containing files to link.
  15. *
  16. * cmLinkDirectoriesCommand is used to specify a list
  17. * of directories containing files to link into executable(s).
  18. * Note that the command supports the use of CMake built-in variables
  19. * such as CMAKE_BINARY_DIR and CMAKE_SOURCE_DIR.
  20. */
  21. class cmLinkDirectoriesCommand : public cmCommand
  22. {
  23. public:
  24. /**
  25. * This is a virtual constructor for the command.
  26. */
  27. virtual cmCommand* Clone()
  28. {
  29. return new cmLinkDirectoriesCommand;
  30. }
  31. /**
  32. * This is called when the command is first encountered in
  33. * the CMakeLists.txt file.
  34. */
  35. virtual bool InitialPass(std::vector<std::string> const& args,
  36. cmExecutionStatus &status);
  37. /**
  38. * The name of the command as specified in CMakeList.txt.
  39. */
  40. virtual std::string GetName() const { return "link_directories";}
  41. cmTypeMacro(cmLinkDirectoriesCommand, cmCommand);
  42. private:
  43. void AddLinkDir(std::string const& dir);
  44. };
  45. #endif