/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ #ifndef cmQtAutoGeneratorRcc_h #define cmQtAutoGeneratorRcc_h #include "cmConfigure.h" // IWYU pragma: keep #include "cmQtAutoGen.h" #include "cmQtAutoGenerator.h" #include "cm_uv.h" #include #include class cmMakefile; // @brief AUTORCC generator class cmQtAutoGeneratorRcc : public cmQtAutoGenerator { CM_DISABLE_COPY(cmQtAutoGeneratorRcc) public: cmQtAutoGeneratorRcc(); ~cmQtAutoGeneratorRcc() override; private: // -- Types /// @brief Processing stage enum class StageT { SETTINGS_READ, TEST_QRC_RCC_FILES, TEST_RESOURCES_READ, TEST_RESOURCES, TEST_INFO_FILE, GENERATE, GENERATE_RCC, GENERATE_WRAPPER, SETTINGS_WRITE, FINISH, END }; // -- Abstract processing interface bool Init(cmMakefile* makefile) override; bool Process() override; // -- Process stage static void UVPollStage(uv_async_t* handle); void PollStage(); void SetStage(StageT stage); // -- Settings file void SettingsFileRead(); void SettingsFileWrite(); // -- Tests bool TestQrcRccFiles(); bool TestResourcesRead(); bool TestResources(); void TestInfoFile(); // -- Generation void GenerateParentDir(); bool GenerateRcc(); void GenerateWrapper(); // -- Utility bool StartProcess(std::string const& workingDirectory, std::vector const& command, bool mergedOutput); private: // -- Config settings bool SettingsChanged_; std::string ConfigSuffix_; MultiConfigT MultiConfig_; // -- Directories std::string AutogenBuildDir_; // -- Qt environment std::string RccExecutable_; std::vector RccListOptions_; // -- Job std::string QrcFile_; std::string QrcFileName_; std::string QrcFileDir_; std::string RccFile_; std::string RccFileWrapper_; std::string RccFileBuild_; std::vector Options_; std::vector Inputs_; // -- Subprocess ProcessResultT ProcessResult_; std::unique_ptr Process_; // -- Settings file std::string SettingsFile_; std::string SettingsString_; // -- libuv loop StageT Stage_; bool Error_; bool Generate_; bool BuildFileChanged_; }; #endif