diff options
author | Brad King <brad.king@kitware.com> | 2014-12-03 14:32:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-12-03 14:32:38 (GMT) |
commit | 7c28e7c17205983ef16d72d4ad6f65649355e805 (patch) | |
tree | ccd521d33c8e0c30980d4f730e3fc01448966c9d /Source | |
parent | 0e7c7bd3df17610795f8fc968370e883b87e50cf (diff) | |
parent | 2a224b4ce3fcc3c25bb3f56cf50806ae79262fc2 (diff) | |
download | CMake-7c28e7c17205983ef16d72d4ad6f65649355e805.zip CMake-7c28e7c17205983ef16d72d4ad6f65649355e805.tar.gz CMake-7c28e7c17205983ef16d72d4ad6f65649355e805.tar.bz2 |
Merge branch 'vs-hlsl-settings' into release
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 2b73749..5b4bdaf 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -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"; } |