From e79e412e70cb439354df589d83d3878c4dbe62fc Mon Sep 17 00:00:00 2001 From: David Cole Date: Thu, 9 Sep 2010 16:21:57 -0400 Subject: VS2010: Honor PROJECT_LABEL target property (#10611) --- Source/cmVisualStudio10TargetGenerator.cxx | 7 +++++++ Tests/FunctionTest/CMakeLists.txt | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 477945b..b374579 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -155,6 +155,13 @@ void cmVisualStudio10TargetGenerator::Generate() this->WriteString("Win32Proj\n", 2); this->WriteString("", 2); (*this->BuildFileStream) << this->Platform << "\n"; + const char* projLabel = this->Target->GetProperty("PROJECT_LABEL"); + if(!projLabel) + { + projLabel = this->Name.c_str(); + } + this->WriteString("", 2); + (*this->BuildFileStream) << projLabel << "\n"; this->WriteString("\n", 1); this->WriteString("\n", diff --git a/Tests/FunctionTest/CMakeLists.txt b/Tests/FunctionTest/CMakeLists.txt index ef55173..5d4f42d 100644 --- a/Tests/FunctionTest/CMakeLists.txt +++ b/Tests/FunctionTest/CMakeLists.txt @@ -166,3 +166,11 @@ ELSE(DEFINED SUBDIR_DEFINED) ENDIF(DEFINED SUBDIR_DEFINED) ADD_EXECUTABLE(FunctionTest functionTest.c) + +# Use the PROJECT_LABEL property: in IDEs, the project label should appear +# in the UI rather than the target name. If this were a good test of the +# property rather than just a smoke test, it would verify that the label +# actually appears in the UI of the IDE... Or at least that the text appears +# somewhere in the generated project files. +SET_PROPERTY(TARGET miniFunctionTest + PROPERTY PROJECT_LABEL "Test de Fonctionnement") -- cgit v0.12