summaryrefslogtreecommitdiff
path: root/Source/cmIncludeExternalMSProjectCommand.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2009-07-14 14:16:46 -0400
committerBill Hoffman <bill.hoffman@kitware.com>2009-07-14 14:16:46 -0400
commit3d1c12b802c3dd3a0284f5f10aec3b98ab6d3a78 (patch)
tree7f54a15847997cffa6979fb9267263a01029cd48 /Source/cmIncludeExternalMSProjectCommand.cxx
parentb23b1800a586b0afb316f92d9bde82896c804ef5 (diff)
downloadcmake-3d1c12b802c3dd3a0284f5f10aec3b98ab6d3a78.tar.gz
ENH: remove INCLUDE_EXTERNAL_MSPROJECT name hack, and use target properties instead, fix VXExternalInclude test for VS10
Diffstat (limited to 'Source/cmIncludeExternalMSProjectCommand.cxx')
-rw-r--r--Source/cmIncludeExternalMSProjectCommand.cxx31
1 files changed, 6 insertions, 25 deletions
diff --git a/Source/cmIncludeExternalMSProjectCommand.cxx b/Source/cmIncludeExternalMSProjectCommand.cxx
index 2ab46c830e..a4de3c0d1e 100644
--- a/Source/cmIncludeExternalMSProjectCommand.cxx
+++ b/Source/cmIncludeExternalMSProjectCommand.cxx
@@ -30,37 +30,18 @@ bool cmIncludeExternalMSProjectCommand
#ifdef _WIN32
if(this->Makefile->GetDefinition("WIN32"))
{
- std::string location = args[1];
-
- std::vector<std::string> depends;
- if (args.size() > 2)
- {
- for (unsigned int i=2; i<args.size(); ++i)
- {
- depends.push_back(args[i]);
- }
- }
-
- // Hack together a utility target storing enough information
- // to reproduce the target inclusion.
- std::string utility_name("INCLUDE_EXTERNAL_MSPROJECT");
- utility_name += "_";
- utility_name += args[0];
std::string path = args[1];
cmSystemTools::ConvertToUnixSlashes(path);
// Create a target instance for this utility.
cmTarget* target=this->Makefile->AddNewTarget(cmTarget::UTILITY,
- utility_name.c_str());
+ args[0].c_str());
+ target->SetProperty("EXTERNAL_MSPROJECT", path.c_str());
target->SetProperty("EXCLUDE_FROM_ALL","FALSE");
- std::vector<std::string> no_outputs;
- cmCustomCommandLines commandLines;
- cmCustomCommandLine commandLine;
- commandLine.push_back(args[0]);
- commandLine.push_back(path);
- commandLines.push_back(commandLine);
- cmCustomCommand cc(no_outputs, depends, commandLines, 0, 0);
- target->GetPostBuildCommands().push_back(cc);
+ for (unsigned int i=2; i<args.size(); ++i)
+ {
+ target->AddUtility(args[i].c_str());
+ }
}
#endif
return true;