|
@@ -1211,6 +1211,7 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
|
|
|
std::string shaderType;
|
|
std::string shaderType;
|
|
|
std::string shaderEntryPoint;
|
|
std::string shaderEntryPoint;
|
|
|
std::string shaderModel;
|
|
std::string shaderModel;
|
|
|
|
|
+ std::string shaderAdditionalFlags;
|
|
|
std::string ext = cmSystemTools::LowerCase(sf->GetExtension());
|
|
std::string ext = cmSystemTools::LowerCase(sf->GetExtension());
|
|
|
if(ext == "hlsl")
|
|
if(ext == "hlsl")
|
|
|
{
|
|
{
|
|
@@ -1233,6 +1234,12 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
|
|
|
shaderModel = sm;
|
|
shaderModel = sm;
|
|
|
toolHasSettings = true;
|
|
toolHasSettings = true;
|
|
|
}
|
|
}
|
|
|
|
|
+ // Figure out if there's any additional flags to use
|
|
|
|
|
+ if (const char* saf = sf->GetProperty("VS_SHADER_FLAGS"))
|
|
|
|
|
+ {
|
|
|
|
|
+ shaderAdditionalFlags = saf;
|
|
|
|
|
+ toolHasSettings = true;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
else if(ext == "jpg" ||
|
|
else if(ext == "jpg" ||
|
|
|
ext == "png")
|
|
ext == "png")
|
|
@@ -1342,6 +1349,12 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
|
|
|
(*this->BuildFileStream) << cmVS10EscapeXML(shaderModel)
|
|
(*this->BuildFileStream) << cmVS10EscapeXML(shaderModel)
|
|
|
<< "</ShaderModel>\n";
|
|
<< "</ShaderModel>\n";
|
|
|
}
|
|
}
|
|
|
|
|
+ if(!shaderAdditionalFlags.empty())
|
|
|
|
|
+ {
|
|
|
|
|
+ this->WriteString("<AdditionalOptions>", 3);
|
|
|
|
|
+ (*this->BuildFileStream) << cmVS10EscapeXML(shaderAdditionalFlags)
|
|
|
|
|
+ << "</AdditionalOptions>\n";
|
|
|
|
|
+ }
|
|
|
this->WriteString("</", 2);
|
|
this->WriteString("</", 2);
|
|
|
(*this->BuildFileStream) << tool << ">\n";
|
|
(*this->BuildFileStream) << tool << ">\n";
|
|
|
}
|
|
}
|