mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-16 12:11:04 -06:00
VS: Add VS_SHADER_OBJECT_FILE_NAME source file property
This commit is contained in:
committed by
Brad King
parent
1f372ac4e5
commit
8d1ccbc693
@@ -405,6 +405,7 @@ Properties on Source Files
|
|||||||
/prop_sf/VS_SHADER_ENTRYPOINT
|
/prop_sf/VS_SHADER_ENTRYPOINT
|
||||||
/prop_sf/VS_SHADER_FLAGS
|
/prop_sf/VS_SHADER_FLAGS
|
||||||
/prop_sf/VS_SHADER_MODEL
|
/prop_sf/VS_SHADER_MODEL
|
||||||
|
/prop_sf/VS_SHADER_OBJECT_FILE_NAME
|
||||||
/prop_sf/VS_SHADER_OUTPUT_HEADER_FILE
|
/prop_sf/VS_SHADER_OUTPUT_HEADER_FILE
|
||||||
/prop_sf/VS_SHADER_TYPE
|
/prop_sf/VS_SHADER_TYPE
|
||||||
/prop_sf/VS_SHADER_VARIABLE_NAME
|
/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 shaderAdditionalFlags;
|
||||||
std::string shaderDisableOptimizations;
|
std::string shaderDisableOptimizations;
|
||||||
std::string shaderEnableDebug;
|
std::string shaderEnableDebug;
|
||||||
|
std::string shaderObjectFileName;
|
||||||
std::string outputHeaderFile;
|
std::string outputHeaderFile;
|
||||||
std::string variableName;
|
std::string variableName;
|
||||||
std::string settingsGenerator;
|
std::string settingsGenerator;
|
||||||
@@ -1666,6 +1667,10 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
|
|||||||
shaderDisableOptimizations = cmSystemTools::IsOn(sdo) ? "true" : "false";
|
shaderDisableOptimizations = cmSystemTools::IsOn(sdo) ? "true" : "false";
|
||||||
toolHasSettings = true;
|
toolHasSettings = true;
|
||||||
}
|
}
|
||||||
|
if (const char* sofn = sf->GetProperty("VS_SHADER_OBJECT_FILE_NAME")) {
|
||||||
|
shaderObjectFileName = sofn;
|
||||||
|
toolHasSettings = true;
|
||||||
|
}
|
||||||
} else if (ext == "jpg" || ext == "png") {
|
} else if (ext == "jpg" || ext == "png") {
|
||||||
tool = "Image";
|
tool = "Image";
|
||||||
} else if (ext == "resw") {
|
} else if (ext == "resw") {
|
||||||
@@ -1808,6 +1813,9 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
|
|||||||
this->WriteElemEscapeXML("DisableOptimizations",
|
this->WriteElemEscapeXML("DisableOptimizations",
|
||||||
shaderDisableOptimizations, 3);
|
shaderDisableOptimizations, 3);
|
||||||
}
|
}
|
||||||
|
if (!shaderObjectFileName.empty()) {
|
||||||
|
this->WriteElemEscapeXML("ObjectFileOutput", shaderObjectFileName, 3);
|
||||||
|
}
|
||||||
if (!shaderAdditionalFlags.empty()) {
|
if (!shaderAdditionalFlags.empty()) {
|
||||||
this->WriteElemEscapeXML("AdditionalOptions", shaderAdditionalFlags, 3);
|
this->WriteElemEscapeXML("AdditionalOptions", shaderAdditionalFlags, 3);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user