diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2017-05-15 08:37:42 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2017-05-26 13:23:21 (GMT) |
commit | 0965002e57f7461d290792252b289fda9247d530 (patch) | |
tree | eb1b492d6dbe1aefb8231dfd6c75ed143f4ea757 /Source/cmQtAutoGeneratorInitializer.cxx | |
parent | 83e4a8e63713c3e99f81aac2973763c6252846bc (diff) | |
download | CMake-0965002e57f7461d290792252b289fda9247d530.zip CMake-0965002e57f7461d290792252b289fda9247d530.tar.gz CMake-0965002e57f7461d290792252b289fda9247d530.tar.bz2 |
Autogen: Pass build directory in Info file
Diffstat (limited to 'Source/cmQtAutoGeneratorInitializer.cxx')
-rw-r--r-- | Source/cmQtAutoGeneratorInitializer.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index 239b18d..bc5095d 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -67,7 +67,7 @@ static std::string GetAutogenTargetFilesDir(cmGeneratorTarget const* target) targetDir += makefile->GetCMakeInstance()->GetCMakeFilesDirectory(); targetDir += "/"; targetDir += GetAutogenTargetName(target); - targetDir += ".dir/"; + targetDir += ".dir"; return targetDir; } @@ -77,7 +77,6 @@ static std::string GetAutogenTargetBuildDir(cmGeneratorTarget const* target) std::string targetDir = makefile->GetCurrentBinaryDirectory(); targetDir += "/"; targetDir += GetAutogenTargetName(target); - targetDir += "/"; return targetDir; } @@ -624,7 +623,7 @@ void cmQtAutoGeneratorInitializer::InitializeAutogenSources( if (target->GetPropertyAsBool("AUTOMOC")) { cmMakefile* makefile = target->Target->GetMakefile(); std::string mocCppFile = GetAutogenTargetBuildDir(target); - mocCppFile += "moc_compilation.cpp"; + mocCppFile += "/moc_compilation.cpp"; { cmSourceFile* gFile = makefile->GetOrCreateSource(mocCppFile, true); gFile->SetProperty("SKIP_AUTOGEN", "On"); @@ -706,14 +705,14 @@ void cmQtAutoGeneratorInitializer::InitializeAutogenTarget( // Create autogen target includes directory and // add it to the origin target INCLUDE_DIRECTORIES if (mocEnabled || uicEnabled) { - const std::string incsDir = autogenBuildDir + "include"; + const std::string incsDir = autogenBuildDir + "/include"; cmSystemTools::MakeDirectory(incsDir); target->AddIncludeDirectory(incsDir, true); } // Register moc compilation file as generated if (mocEnabled) { - autogenProvides.push_back(autogenBuildDir + "moc_compilation.cpp"); + autogenProvides.push_back(autogenBuildDir + "/moc_compilation.cpp"); } #if defined(_WIN32) && !defined(__CYGWIN__) @@ -785,6 +784,7 @@ void cmQtAutoGeneratorInitializer::InitializeAutogenTarget( // Compose rcc output file name { std::string rccOut = autogenBuildDir; + rccOut += "/"; rccOut += fpathCheckSum.getPart(absFile); rccOut += "/qrc_"; rccOut += @@ -919,6 +919,8 @@ void cmQtAutoGeneratorInitializer::SetupAutoGenerateTarget( } } + AddDefinitionEscaped(makefile, "_autogen_build_dir", + GetAutogenTargetBuildDir(target)); AddDefinitionEscaped(makefile, "_autogen_target_name", autogenTargetName); AddDefinitionEscaped(makefile, "_origin_target_name", target->GetName()); AddDefinitionEscaped(makefile, "_qt_version_major", qtMajorVersion); |