cmQtAutoGeneratorInitializer.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2004-2011 Kitware, Inc.
  4. Copyright 2011 Alexander Neundorf ([email protected])
  5. Distributed under the OSI-approved BSD License (the "License");
  6. see accompanying file Copyright.txt for details.
  7. This software is distributed WITHOUT ANY WARRANTY; without even the
  8. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  9. See the License for more information.
  10. ============================================================================*/
  11. #ifndef cmQtAutoGeneratorInitializer_h
  12. #define cmQtAutoGeneratorInitializer_h
  13. #include "cmStandardIncludes.h"
  14. #include <string>
  15. #include <vector>
  16. #include <map>
  17. class cmSourceFile;
  18. class cmTarget;
  19. class cmLocalGenerator;
  20. class cmQtAutoGeneratorInitializer
  21. {
  22. public:
  23. static void InitializeAutogenSources(cmTarget* target);
  24. static void InitializeAutogenTarget(cmLocalGenerator* lg, cmTarget* target);
  25. static void SetupAutoGenerateTarget(cmTarget const* target);
  26. static std::string GetAutogenTargetName(cmTarget const* target);
  27. static std::string GetAutogenTargetDir(cmTarget const* target);
  28. private:
  29. static void SetupSourceFiles(cmTarget const* target,
  30. std::vector<std::string>& skipMoc,
  31. std::vector<std::string>& mocSources,
  32. std::vector<std::string>& mocHeaders,
  33. std::vector<std::string>& skipUic);
  34. static void SetupAutoMocTarget(cmTarget const* target,
  35. const std::string &autogenTargetName,
  36. const std::vector<std::string>& skipMoc,
  37. const std::vector<std::string>& mocHeaders,
  38. std::map<std::string, std::string> &configIncludes,
  39. std::map<std::string, std::string> &configDefines);
  40. static void SetupAutoUicTarget(cmTarget const* target,
  41. const std::vector<std::string>& skipUic,
  42. std::map<std::string, std::string> &configUicOptions);
  43. static void SetupAutoRccTarget(cmTarget const* target);
  44. static void MergeRccOptions(std::vector<std::string> &opts,
  45. const std::vector<std::string> &fileOpts, bool isQt5);
  46. static std::string GetRccExecutable(cmTarget const* target);
  47. static std::string ListQt5RccInputs(cmSourceFile* sf, cmTarget const* target,
  48. std::vector<std::string>& depends);
  49. static std::string ListQt4RccInputs(cmSourceFile* sf,
  50. std::vector<std::string>& depends);
  51. };
  52. #endif