cmExportSet.cxx 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2012 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. #include "cmExportSet.h"
  11. #include "cmTargetExport.h"
  12. #include "cmAlgorithms.h"
  13. #include "cmLocalGenerator.h"
  14. cmExportSet::~cmExportSet()
  15. {
  16. cmDeleteAll(this->TargetExports);
  17. }
  18. void cmExportSet::Compute(cmLocalGenerator* lg)
  19. {
  20. for (std::vector<cmTargetExport*>::iterator it = this->TargetExports.begin();
  21. it != this->TargetExports.end(); ++it)
  22. {
  23. (*it)->Target = lg->FindGeneratorTargetToUse((*it)->TargetName);
  24. }
  25. }
  26. void cmExportSet::AddTargetExport(cmTargetExport* te)
  27. {
  28. this->TargetExports.push_back(te);
  29. }
  30. void cmExportSet::AddInstallation(cmInstallExportGenerator const* installation)
  31. {
  32. this->Installations.push_back(installation);
  33. }