From 49840778b92fbdb691eb90c15eae68f770cbc1ad Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Sat, 19 Nov 2005 09:40:11 -0500 Subject: ENH: add some more properties for visual studio projects --- Source/cmLocalVisualStudio7Generator.cxx | 17 +++++++++++++---- Source/cmSetTargetPropertiesCommand.h | 6 +++++- 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 &) { fout << "\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\n" << "\t\t\n" << "\t\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."; } -- cgit v0.12