cmExportTryCompileFileGenerator.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2013 Stephen Kelly <[email protected]>
  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 cmExportInstallFileGenerator_h
  11. #define cmExportInstallFileGenerator_h
  12. #include "cmExportFileGenerator.h"
  13. class cmInstallExportGenerator;
  14. class cmInstallTargetGenerator;
  15. class cmExportTryCompileFileGenerator: public cmExportFileGenerator
  16. {
  17. public:
  18. /** Set the list of targets to export. */
  19. void SetExports(const std::vector<cmTarget const*> &exports)
  20. { this->Exports = exports; }
  21. void SetConfig(const char *config) { this->Config = config; }
  22. protected:
  23. // Implement virtual methods from the superclass.
  24. virtual bool GenerateMainFile(std::ostream& os);
  25. virtual void GenerateImportTargetsConfig(std::ostream&,
  26. const char*,
  27. std::string const&,
  28. std::vector<std::string>&) {}
  29. virtual void HandleMissingTarget(std::string&,
  30. std::vector<std::string>&,
  31. cmMakefile*,
  32. cmTarget*,
  33. cmTarget*) {}
  34. void PopulateProperties(cmTarget const* target,
  35. ImportPropertyMap& properties,
  36. std::set<cmTarget const*> &emitted);
  37. std::string InstallNameDir(cmTarget* target,
  38. const std::string& config);
  39. private:
  40. std::string FindTargets(const std::string& prop, cmTarget const* tgt,
  41. std::set<cmTarget const*> &emitted);
  42. std::vector<cmTarget const*> Exports;
  43. const char *Config;
  44. };
  45. #endif