浏览代码

fixed cable package issue

Ken Martin 24 年之前
父节点
当前提交
7b362bdb1f
共有 2 个文件被更改,包括 5 次插入1 次删除
  1. 4 0
      Source/cmCablePackageCommand.cxx
  2. 1 1
      Source/cmMakefile.h

+ 4 - 0
Source/cmCablePackageCommand.cxx

@@ -15,6 +15,7 @@
 =========================================================================*/
 =========================================================================*/
 #include "cmCablePackageCommand.h"
 #include "cmCablePackageCommand.h"
 #include "cmCacheManager.h"
 #include "cmCacheManager.h"
+#include "cmTarget.h"
 
 
 
 
 cmCablePackageCommand::~cmCablePackageCommand()
 cmCablePackageCommand::~cmCablePackageCommand()
@@ -115,6 +116,9 @@ bool cmCablePackageCommand::Invoke(std::vector<std::string>& args)
                                depends,
                                depends,
                                outputs, m_TargetName.c_str());
                                outputs, m_TargetName.c_str());
   
   
+  // add the source list to the target
+  m_Makefile->GetTargets()[m_TargetName.c_str()].m_SourceLists.push_back(m_PackageName);
+
   return true;
   return true;
 }
 }
 
 

+ 1 - 1
Source/cmMakefile.h

@@ -275,7 +275,7 @@ public:
   /**
   /**
    * Get the list of targets
    * Get the list of targets
    */
    */
-  const cmTargets &GetTargets() { return m_Targets; }
+  cmTargets &GetTargets() { return m_Targets; }
 
 
   /**
   /**
    * Get a list of the build subdirectories.
    * Get a list of the build subdirectories.