summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx17
-rw-r--r--Source/cmSetTargetPropertiesCommand.h6
2 files changed, 18 insertions, 5 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 3af2ba4..fbd628a 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -1321,7 +1321,7 @@ void cmLocalVisualStudio7Generator::OutputTargetRules(std::ostream& fout,
void
cmLocalVisualStudio7Generator::WriteProjectStart(std::ostream& fout,
const char *libName,
- cmTarget &,
+ cmTarget & target,
std::vector<cmSourceGroup> &)
{
fout << "<?xml version=\"1.0\" encoding = \"Windows-1252\"?>\n"
@@ -1342,11 +1342,20 @@ cmLocalVisualStudio7Generator::WriteProjectStart(std::ostream& fout,
fout << "\tVersion=\"7.00\"\n";
}
}
-
- fout << "\tName=\"" << libName << "\"\n"
+ const char* projLabel = target.GetProperty("PROJECT_LABEL");
+ if(!projLabel)
+ {
+ projLabel = libName;
+ }
+ const char* keyword = target.GetProperty("VS_KEYWORD");
+ if(!keyword)
+ {
+ keyword = "Win32Proj";
+ }
+ fout << "\tName=\"" << projLabel << "\"\n"
<< "\tSccProjectName=\"\"\n"
<< "\tSccLocalPath=\"\"\n"
- << "\tKeyword=\"Win32Proj\">\n"
+ << "\tKeyword=\"" << keyword << "\">\n"
<< "\t<Platforms>\n"
<< "\t\t<Platform\n\t\t\tName=\"Win32\"/>\n"
<< "\t</Platforms>\n";
diff --git a/Source/cmSetTargetPropertiesCommand.h b/Source/cmSetTargetPropertiesCommand.h
index 1ae1a59..91eb34a 100644
--- a/Source/cmSetTargetPropertiesCommand.h
+++ b/Source/cmSetTargetPropertiesCommand.h
@@ -78,7 +78,11 @@ public:
"used in place of the target name when creating executables. "
"If not set here then it is set to target_EXPORTS by default "
"(with some substitutions if the target is not a valid C "
- "identifier). You can use any prop value pair you want and "
+ "identifier). PROJECT_LABEL can be used to change the name of "
+ "the target in an IDE like visual studio. VS_KEYWORD can be set "
+ "to change the visual studio keyword, for example QT integration "
+ "works better if this is set to Qt4VSv1.0. "
+ "You can use any prop value pair you want and "
"extract it later with the GET_TARGET_PROPERTY command.";
}