summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGeneratorInitializer.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-16 17:19:50 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-16 18:24:43 (GMT)
commita892b285f8c621ba50f45f5c4218980c911fd1b6 (patch)
tree4895142f18598d9510b4703a7d7541d0cebf6f4f /Source/cmQtAutoGeneratorInitializer.cxx
parentcb8c728f17a61732064280ddb98203cb277e5a3c (diff)
downloadCMake-a892b285f8c621ba50f45f5c4218980c911fd1b6.zip
CMake-a892b285f8c621ba50f45f5c4218980c911fd1b6.tar.gz
CMake-a892b285f8c621ba50f45f5c4218980c911fd1b6.tar.bz2
cmGeneratorTarget: Move ImportedGetLocation from cmTarget.
Diffstat (limited to 'Source/cmQtAutoGeneratorInitializer.cxx')
-rw-r--r--Source/cmQtAutoGeneratorInitializer.cxx21
1 files changed, 15 insertions, 6 deletions
diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx
index f9875b3..41172f6 100644
--- a/Source/cmQtAutoGeneratorInitializer.cxx
+++ b/Source/cmQtAutoGeneratorInitializer.cxx
@@ -132,6 +132,7 @@ static void SetupAutoMocTarget(cmGeneratorTarget const* target,
std::map<std::string, std::string> &configIncludes,
std::map<std::string, std::string> &configDefines)
{
+ cmLocalGenerator* lg = target->GetLocalGenerator();
cmMakefile* makefile = target->Target->GetMakefile();
const char* tmp = target->GetProperty("AUTOMOC_MOC_OPTIONS");
@@ -188,7 +189,8 @@ static void SetupAutoMocTarget(cmGeneratorTarget const* target,
const char *qtVersion = makefile->GetDefinition("_target_qt_version");
if (strcmp(qtVersion, "5") == 0)
{
- cmTarget *qt5Moc = makefile->FindTargetToUse("Qt5::moc");
+ cmGeneratorTarget *qt5Moc =
+ lg->FindGeneratorTargetToUse("Qt5::moc");
if (!qt5Moc)
{
cmSystemTools::Error("Qt5::moc target not found ",
@@ -200,7 +202,8 @@ static void SetupAutoMocTarget(cmGeneratorTarget const* target,
}
else if (strcmp(qtVersion, "4") == 0)
{
- cmTarget *qt4Moc = makefile->FindTargetToUse("Qt4::moc");
+ cmGeneratorTarget *qt4Moc =
+ lg->FindGeneratorTargetToUse("Qt4::moc");
if (!qt4Moc)
{
cmSystemTools::Error("Qt4::moc target not found ",
@@ -230,6 +233,7 @@ static void SetupAutoUicTarget(cmGeneratorTarget const* target,
std::vector<std::string> const& skipUic,
std::map<std::string, std::string> &configUicOptions)
{
+ cmLocalGenerator* lg = target->GetLocalGenerator();
cmMakefile *makefile = target->Target->GetMakefile();
std::set<std::string> skipped;
@@ -303,7 +307,8 @@ static void SetupAutoUicTarget(cmGeneratorTarget const* target,
std::string targetName = target->GetName();
if (strcmp(qtVersion, "5") == 0)
{
- cmTarget *qt5Uic = makefile->FindTargetToUse("Qt5::uic");
+ cmGeneratorTarget *qt5Uic =
+ lg->FindGeneratorTargetToUse("Qt5::uic");
if (!qt5Uic)
{
// Project does not use Qt5Widgets, but has AUTOUIC ON anyway
@@ -316,7 +321,8 @@ static void SetupAutoUicTarget(cmGeneratorTarget const* target,
}
else if (strcmp(qtVersion, "4") == 0)
{
- cmTarget *qt4Uic = makefile->FindTargetToUse("Qt4::uic");
+ cmGeneratorTarget *qt4Uic =
+ lg->FindGeneratorTargetToUse("Qt4::uic");
if (!qt4Uic)
{
cmSystemTools::Error("Qt4::uic target not found ",
@@ -335,6 +341,7 @@ static void SetupAutoUicTarget(cmGeneratorTarget const* target,
static std::string GetRccExecutable(cmGeneratorTarget const* target)
{
+ cmLocalGenerator* lg = target->GetLocalGenerator();
cmMakefile *makefile = target->Target->GetMakefile();
const char *qtVersion = makefile->GetDefinition("_target_qt_version");
if (!qtVersion)
@@ -355,7 +362,8 @@ static std::string GetRccExecutable(cmGeneratorTarget const* target)
std::string targetName = target->GetName();
if (strcmp(qtVersion, "5") == 0)
{
- cmTarget *qt5Rcc = makefile->FindTargetToUse("Qt5::rcc");
+ cmGeneratorTarget *qt5Rcc =
+ lg->FindGeneratorTargetToUse("Qt5::rcc");
if (!qt5Rcc)
{
cmSystemTools::Error("Qt5::rcc target not found ",
@@ -366,7 +374,8 @@ static std::string GetRccExecutable(cmGeneratorTarget const* target)
}
else if (strcmp(qtVersion, "4") == 0)
{
- cmTarget *qt4Rcc = makefile->FindTargetToUse("Qt4::rcc");
+ cmGeneratorTarget *qt4Rcc =
+ lg->FindGeneratorTargetToUse("Qt4::rcc");
if (!qt4Rcc)
{
cmSystemTools::Error("Qt4::rcc target not found ",