diff options
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 38 |
1 files changed, 32 insertions, 6 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 2ef27e2..2304be8 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -307,7 +307,7 @@ void cmVisualStudio10TargetGenerator::Generate() this->BuildFileStream->SetCopyIfDifferent(true); // Write the encoding header into the file - char magic[] = {0xEF,0xBB, 0xBF}; + char magic[] = {char(0xEF), char(0xBB), char(0xBF)}; this->BuildFileStream->write(magic, 3); //get the tools version to use @@ -326,9 +326,9 @@ void cmVisualStudio10TargetGenerator::Generate() this->WriteString("<PropertyGroup Label=\"NsightTegraProject\">\n", 1); if(this->NsightTegraVersion[0] >= 2) { - // Nsight Tegra 2.0 uses project revision 8. + // Nsight Tegra 2.0 uses project revision 9. this->WriteString("<NsightTegraProjectRevisionNumber>" - "8" + "9" "</NsightTegraProjectRevisionNumber>\n", 2); // Tell newer versions to upgrade silently when loading. this->WriteString("<NsightTegraUpgradeOnceWithoutPrompt>" @@ -937,7 +937,7 @@ void cmVisualStudio10TargetGenerator::WriteGroups() path += ".vcxproj.filters"; cmGeneratedFileStream fout(path.c_str()); fout.SetCopyIfDifferent(true); - char magic[] = {0xEF,0xBB, 0xBF}; + char magic[] = {char(0xEF), char(0xBB), char(0xBF)}; fout.write(magic, 3); cmGeneratedFileStream* save = this->BuildFileStream; this->BuildFileStream = & fout; @@ -1203,6 +1203,8 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) bool toolHasSettings = false; std::string tool = "None"; std::string shaderType; + std::string shaderEntryPoint; + std::string shaderModel; std::string ext = cmSystemTools::LowerCase(sf->GetExtension()); if(ext == "hlsl") { @@ -1213,6 +1215,18 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) shaderType = st; toolHasSettings = true; } + // Figure out which entry point to use if any + if (const char* se = sf->GetProperty("VS_SHADER_ENTRYPOINT")) + { + shaderEntryPoint = se; + toolHasSettings = true; + } + // Figure out which entry point to use if any + if (const char* sm = sf->GetProperty("VS_SHADER_MODEL")) + { + shaderModel = sm; + toolHasSettings = true; + } } else if(ext == "jpg" || ext == "png") @@ -1295,7 +1309,18 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) (*this->BuildFileStream) << cmVS10EscapeXML(shaderType) << "</ShaderType>\n"; } - + if(!shaderEntryPoint.empty()) + { + this->WriteString("<EntryPointName>", 3); + (*this->BuildFileStream) << cmVS10EscapeXML(shaderEntryPoint) + << "</EntryPointName>\n"; + } + if(!shaderModel.empty()) + { + this->WriteString("<ShaderModel>", 3); + (*this->BuildFileStream) << cmVS10EscapeXML(shaderModel) + << "</ShaderModel>\n"; + } this->WriteString("</", 2); (*this->BuildFileStream) << tool << ">\n"; } @@ -2036,7 +2061,8 @@ WriteMasmOptions(std::string const& configName, void cmVisualStudio10TargetGenerator::WriteLibOptions(std::string const& config) { - if(this->Target->GetType() != cmTarget::STATIC_LIBRARY) + if(this->Target->GetType() != cmTarget::STATIC_LIBRARY && + this->Target->GetType() != cmTarget::OBJECT_LIBRARY) { return; } |