|
|
@@ -1020,11 +1020,22 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
|
|
|
{
|
|
|
bool toolHasSettings = false;
|
|
|
std::string tool = "None";
|
|
|
+ std::string shaderType;
|
|
|
std::string const& ext = sf->GetExtension();
|
|
|
if(ext == "appxmanifest")
|
|
|
{
|
|
|
tool = "AppxManifest";
|
|
|
}
|
|
|
+ else if(ext == "hlsl")
|
|
|
+ {
|
|
|
+ tool = "FXCompile";
|
|
|
+ // Figure out the type of shader compiler to use.
|
|
|
+ if(const char* st = sf->GetProperty("VS_SHADER_TYPE"))
|
|
|
+ {
|
|
|
+ shaderType = st;
|
|
|
+ toolHasSettings = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
else if(ext == "jpg" ||
|
|
|
ext == "png")
|
|
|
{
|
|
|
@@ -1078,6 +1089,12 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if(!shaderType.empty())
|
|
|
+ {
|
|
|
+ this->WriteString("<ShaderType>", 3);
|
|
|
+ (*this->BuildFileStream) << cmVS10EscapeXML(shaderType)
|
|
|
+ << "</ShaderType>\n";
|
|
|
+ }
|
|
|
|
|
|
this->WriteString("</", 2);
|
|
|
(*this->BuildFileStream) << tool << ">\n";
|