[Cmake-commits] CMake branch, next, updated. v3.0.0-rc4-2461-g964ad27

Stephen Kelly steveire at gmail.com
Fri Apr 18 10:43:52 EDT 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  964ad277011a4c327999f6de0661bdf77274cb42 (commit)
       via  33774ca2018666138e5d31dde457643357f33815 (commit)
      from  7ff2e42e20f70eead1f22d998edd328bde004ffb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=964ad277011a4c327999f6de0661bdf77274cb42
commit 964ad277011a4c327999f6de0661bdf77274cb42
Merge: 7ff2e42 33774ca
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Apr 18 10:43:52 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Apr 18 10:43:52 2014 -0400

    Merge topic 'autorcc-target-dir' into next
    
    33774ca2 QtAutogen: Put generated qrc files in a target-specific dir.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=33774ca2018666138e5d31dde457643357f33815
commit 33774ca2018666138e5d31dde457643357f33815
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Apr 17 10:50:50 2014 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Apr 18 16:41:13 2014 +0200

    QtAutogen: Put generated qrc files in a target-specific dir.

diff --git a/Modules/AutogenInfo.cmake.in b/Modules/AutogenInfo.cmake.in
index b6f9791..602b065 100644
--- a/Modules/AutogenInfo.cmake.in
+++ b/Modules/AutogenInfo.cmake.in
@@ -16,6 +16,7 @@ set(AM_CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@/")
 set(AM_CMAKE_CURRENT_BINARY_DIR "@CMAKE_CURRENT_BINARY_DIR@/")
 set(AM_QT_VERSION_MAJOR "@_target_qt_version@")
 set(AM_TARGET_NAME @_moc_target_name@)
+set(AM_ORIGIN_TARGET_NAME @_origin_target_name@)
 set(AM_RELAXED_MODE "@_moc_relaxed_mode@")
 set(AM_UIC_TARGET_OPTIONS @_uic_target_options@)
 set(AM_UIC_OPTIONS_FILES @_qt_uic_options_files@)
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index ae11462..cc6932d 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -367,6 +367,8 @@ void cmQtAutoGenerators::SetupAutoGenerateTarget(cmTarget const* target)
 
   makefile->AddDefinition("_moc_target_name",
           cmLocalGenerator::EscapeForCMake(autogenTargetName).c_str());
+  makefile->AddDefinition("_origin_target_name",
+          cmLocalGenerator::EscapeForCMake(target->GetName()).c_str());
 
   std::string targetDir = getAutogenTargetDir(target);
 
@@ -506,7 +508,9 @@ void cmQtAutoGenerators::SetupSourceFiles(cmTarget const* target)
         std::string basename = cmsys::SystemTools::
                                       GetFilenameWithoutLastExtension(absFile);
 
-        std::string rcc_output_file = makefile->GetCurrentOutputDirectory();
+        std::string rcc_output_dir = target->GetSupportDirectory();
+        cmSystemTools::MakeDirectory(rcc_output_dir.c_str());
+        std::string rcc_output_file = rcc_output_dir;
         rcc_output_file += "/qrc_" + basename + ".cpp";
         makefile->AppendProperty("ADDITIONAL_MAKE_CLEAN_FILES",
                                 rcc_output_file.c_str(), false);
@@ -1063,6 +1067,8 @@ bool cmQtAutoGenerators::ReadAutogenInfoFile(cmMakefile* makefile,
   this->ProjectBinaryDir = makefile->GetSafeDefinition("AM_CMAKE_BINARY_DIR");
   this->ProjectSourceDir = makefile->GetSafeDefinition("AM_CMAKE_SOURCE_DIR");
   this->TargetName = makefile->GetSafeDefinition("AM_TARGET_NAME");
+  this->OriginTargetName
+                      = makefile->GetSafeDefinition("AM_ORIGIN_TARGET_NAME");
 
   {
   const char *uicOptionsFiles
@@ -2057,7 +2063,9 @@ bool cmQtAutoGenerators::GenerateQrc()
     std::string basename = cmsys::SystemTools::
                                   GetFilenameWithoutLastExtension(*si);
 
-    std::string rcc_output_file = this->Builddir + "qrc_" + basename + ".cpp";
+    std::string rcc_output_file = this->Builddir
+                                + "CMakeFiles/" + this->OriginTargetName
+                                + ".dir/qrc_" + basename + ".cpp";
 
     int sourceNewerThanQrc = 0;
     bool success = cmsys::SystemTools::FileTimeCompare(si->c_str(),
diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h
index 8003795..501e13a 100644
--- a/Source/cmQtAutoGenerators.h
+++ b/Source/cmQtAutoGenerators.h
@@ -104,6 +104,7 @@ private:
   std::string ProjectBinaryDir;
   std::string ProjectSourceDir;
   std::string TargetName;
+  std::string OriginTargetName;
 
   std::string CurrentCompileSettingsStr;
   std::string OldCompileSettingsStr;

-----------------------------------------------------------------------

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list