mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 13:20:47 -06:00
Merge topic 'vs-hlsl-object-name'
8d1ccbc693 VS: Add VS_SHADER_OBJECT_FILE_NAME source file property
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1997
This commit is contained in:
@@ -405,6 +405,7 @@ Properties on Source Files
|
||||
/prop_sf/VS_SHADER_ENTRYPOINT
|
||||
/prop_sf/VS_SHADER_FLAGS
|
||||
/prop_sf/VS_SHADER_MODEL
|
||||
/prop_sf/VS_SHADER_OBJECT_FILE_NAME
|
||||
/prop_sf/VS_SHADER_OUTPUT_HEADER_FILE
|
||||
/prop_sf/VS_SHADER_TYPE
|
||||
/prop_sf/VS_SHADER_VARIABLE_NAME
|
||||
|
||||
6
Help/prop_sf/VS_SHADER_OBJECT_FILE_NAME.rst
Normal file
6
Help/prop_sf/VS_SHADER_OBJECT_FILE_NAME.rst
Normal file
@@ -0,0 +1,6 @@
|
||||
VS_SHADER_OBJECT_FILE_NAME
|
||||
--------------------------
|
||||
|
||||
Specifies a file name for the compiled shader object file for an ``.hlsl``
|
||||
source file. This adds the ``-Fo`` flag to the command line for the FxCompiler
|
||||
tool.
|
||||
6
Help/release/dev/vs-hlsl-object-name.rst
Normal file
6
Help/release/dev/vs-hlsl-object-name.rst
Normal file
@@ -0,0 +1,6 @@
|
||||
vs-hlsl-object-name
|
||||
-------------------
|
||||
|
||||
* HLSL source file property :prop_sf:`VS_SHADER_OBJECT_FILE_NAME` has been
|
||||
added to the :ref:`Visual Studio Generators` for VS 2010 and above.
|
||||
The property specifies the file name of the compiled shader object.
|
||||
@@ -1590,6 +1590,7 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
|
||||
std::string shaderAdditionalFlags;
|
||||
std::string shaderDisableOptimizations;
|
||||
std::string shaderEnableDebug;
|
||||
std::string shaderObjectFileName;
|
||||
std::string outputHeaderFile;
|
||||
std::string variableName;
|
||||
std::string settingsGenerator;
|
||||
@@ -1666,6 +1667,10 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
|
||||
shaderDisableOptimizations = cmSystemTools::IsOn(sdo) ? "true" : "false";
|
||||
toolHasSettings = true;
|
||||
}
|
||||
if (const char* sofn = sf->GetProperty("VS_SHADER_OBJECT_FILE_NAME")) {
|
||||
shaderObjectFileName = sofn;
|
||||
toolHasSettings = true;
|
||||
}
|
||||
} else if (ext == "jpg" || ext == "png") {
|
||||
tool = "Image";
|
||||
} else if (ext == "resw") {
|
||||
@@ -1808,6 +1813,9 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
|
||||
this->WriteElemEscapeXML("DisableOptimizations",
|
||||
shaderDisableOptimizations, 3);
|
||||
}
|
||||
if (!shaderObjectFileName.empty()) {
|
||||
this->WriteElemEscapeXML("ObjectFileOutput", shaderObjectFileName, 3);
|
||||
}
|
||||
if (!shaderAdditionalFlags.empty()) {
|
||||
this->WriteElemEscapeXML("AdditionalOptions", shaderAdditionalFlags, 3);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user