cmake/Source/cmQtAutoRcc.h

82 lines
2.0 KiB
C
Raw Normal View History

2018-04-23 21:13:27 +02:00
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
2019-11-11 23:01:05 +01:00
#ifndef cmQtAutoRcc_h
#define cmQtAutoRcc_h
2018-04-23 21:13:27 +02:00
#include "cmConfigure.h" // IWYU pragma: keep
2018-08-09 18:06:22 +02:00
#include "cmFileLock.h"
2019-11-11 23:01:05 +01:00
#include "cmFileTime.h"
2018-04-23 21:13:27 +02:00
#include "cmQtAutoGenerator.h"
#include <string>
#include <vector>
class cmMakefile;
// @brief AUTORCC generator
2019-11-11 23:01:05 +01:00
class cmQtAutoRcc : public cmQtAutoGenerator
2018-04-23 21:13:27 +02:00
{
public:
2019-11-11 23:01:05 +01:00
cmQtAutoRcc();
~cmQtAutoRcc() override;
2018-04-23 21:13:27 +02:00
2019-11-11 23:01:05 +01:00
cmQtAutoRcc(cmQtAutoRcc const&) = delete;
cmQtAutoRcc& operator=(cmQtAutoRcc const&) = delete;
2018-04-23 21:13:27 +02:00
2019-11-11 23:01:05 +01:00
private:
// -- Utility
Logger const& Log() const { return Logger_; }
bool IsMultiConfig() const { return MultiConfig_; }
std::string MultiConfigOutput() const;
2018-04-23 21:13:27 +02:00
// -- Abstract processing interface
bool Init(cmMakefile* makefile) override;
bool Process() override;
// -- Settings file
2018-08-09 18:06:22 +02:00
bool SettingsFileRead();
2019-11-11 23:01:05 +01:00
bool SettingsFileWrite();
2018-04-23 21:13:27 +02:00
// -- Tests
2019-11-11 23:01:05 +01:00
bool TestQrcRccFiles(bool& generate);
bool TestResources(bool& generate);
bool TestInfoFile();
2018-04-23 21:13:27 +02:00
// -- Generation
bool GenerateRcc();
2019-11-11 23:01:05 +01:00
bool GenerateWrapper();
2018-04-23 21:13:27 +02:00
private:
2019-11-11 23:01:05 +01:00
// -- Logging
Logger Logger_;
2018-04-23 21:13:27 +02:00
// -- Config settings
2019-11-11 23:01:05 +01:00
bool MultiConfig_ = false;
2018-04-23 21:13:27 +02:00
// -- Directories
std::string AutogenBuildDir_;
std::string IncludeDir_;
// -- Qt environment
std::string RccExecutable_;
2019-11-11 23:01:05 +01:00
cmFileTime RccExecutableTime_;
2018-04-23 21:13:27 +02:00
std::vector<std::string> RccListOptions_;
// -- Job
2018-08-09 18:06:22 +02:00
std::string LockFile_;
cmFileLock LockFileLock_;
2018-04-23 21:13:27 +02:00
std::string QrcFile_;
std::string QrcFileName_;
std::string QrcFileDir_;
2019-11-11 23:01:05 +01:00
cmFileTime QrcFileTime_;
2018-04-23 21:13:27 +02:00
std::string RccPathChecksum_;
std::string RccFileName_;
std::string RccFileOutput_;
std::string RccFilePublic_;
2019-11-11 23:01:05 +01:00
cmFileTime RccFileTime_;
std::string Reason;
2018-04-23 21:13:27 +02:00
std::vector<std::string> Options_;
std::vector<std::string> Inputs_;
// -- Settings file
std::string SettingsFile_;
std::string SettingsString_;
2019-11-11 23:01:05 +01:00
bool SettingsChanged_ = false;
bool BuildFileChanged_ = false;
2018-04-23 21:13:27 +02:00
};
#endif