mirror of
https://github.com/reactos/CMake.git
synced 2024-12-04 01:22:28 +00:00
QtAutogen: Add _automoc.cpp sources before initializing.
This commit is contained in:
parent
8b6ec29d40
commit
c3c20d3ce3
@ -1456,6 +1456,7 @@ void cmGlobalGenerator::CreateQtAutoGeneratorsTargets(AutogensType &autogens)
|
||||
cmTarget& target = *this->LocalGenerators[i]
|
||||
->GetMakefile()->FindTarget(*ti, true);
|
||||
|
||||
cmQtAutoGenerators::InitializeAutogenSources(&target);
|
||||
cmQtAutoGenerators::InitializeAutogenTarget(
|
||||
this->LocalGenerators[i], &target);
|
||||
cmQtAutoGenerators autogen;
|
||||
|
@ -286,8 +286,8 @@ std::string cmQtAutoGenerators::ListQt4RccInputs(cmSourceFile* sf,
|
||||
return entriesList;
|
||||
}
|
||||
|
||||
void cmQtAutoGenerators::InitializeAutogenTarget(cmLocalGenerator* lg,
|
||||
cmTarget* target)
|
||||
|
||||
void cmQtAutoGenerators::InitializeAutogenSources(cmTarget* target)
|
||||
{
|
||||
cmMakefile* makefile = target->GetMakefile();
|
||||
|
||||
@ -304,6 +304,19 @@ void cmQtAutoGenerators::InitializeAutogenTarget(cmLocalGenerator* lg,
|
||||
|
||||
target->AddSource(mocCppFile);
|
||||
}
|
||||
}
|
||||
|
||||
void cmQtAutoGenerators::InitializeAutogenTarget(cmLocalGenerator* lg,
|
||||
cmTarget* target)
|
||||
{
|
||||
cmMakefile* makefile = target->GetMakefile();
|
||||
|
||||
std::string qtMajorVersion = makefile->GetSafeDefinition("QT_VERSION_MAJOR");
|
||||
if (qtMajorVersion == "")
|
||||
{
|
||||
qtMajorVersion = makefile->GetSafeDefinition("Qt5Core_VERSION_MAJOR");
|
||||
}
|
||||
|
||||
// create a custom target for running generators at buildtime:
|
||||
std::string autogenTargetName = getAutogenTargetName(target);
|
||||
|
||||
|
@ -31,6 +31,7 @@ public:
|
||||
cmQtAutoGenerators();
|
||||
bool Run(const std::string& targetDirectory, const std::string& config);
|
||||
|
||||
static void InitializeAutogenSources(cmTarget* target);
|
||||
static void InitializeAutogenTarget(cmLocalGenerator* lg, cmTarget* target);
|
||||
static void SetupAutoGenerateTarget(cmTarget const* target);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user