mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-23 23:18:38 -06:00
Windows: Allow manifest files to be bundled as content
This commit is contained in:
@@ -2047,7 +2047,11 @@ void cmGeneratorTarget::ComputeKindedSources(KindedSources& files,
|
|||||||
} else if (ext == "appxmanifest") {
|
} else if (ext == "appxmanifest") {
|
||||||
kind = SourceKindAppManifest;
|
kind = SourceKindAppManifest;
|
||||||
} else if (ext == "manifest") {
|
} else if (ext == "manifest") {
|
||||||
kind = SourceKindManifest;
|
if (sf->GetPropertyAsBool("VS_DEPLOYMENT_CONTENT")) {
|
||||||
|
kind = SourceKindExtra;
|
||||||
|
} else {
|
||||||
|
kind = SourceKindManifest;
|
||||||
|
}
|
||||||
} else if (ext == "pfx") {
|
} else if (ext == "pfx") {
|
||||||
kind = SourceKindCertificate;
|
kind = SourceKindCertificate;
|
||||||
} else if (ext == "xaml") {
|
} else if (ext == "xaml") {
|
||||||
|
|||||||
@@ -63,7 +63,8 @@ set(VERTEXSHADER_FILES
|
|||||||
Direct3DApp1/SimpleVertexShader.hlsl
|
Direct3DApp1/SimpleVertexShader.hlsl
|
||||||
)
|
)
|
||||||
|
|
||||||
set(CONTENT_FILES ${PIXELSHADER_FILES} ${VERTEXSHADER_FILES})
|
set(COPY_TO_OUTPUT_FILES Direct3DApp1/Simple.manifest)
|
||||||
|
set(CONTENT_FILES ${PIXELSHADER_FILES} ${VERTEXSHADER_FILES} ${COPY_TO_OUTPUT_FILES})
|
||||||
|
|
||||||
if (WINDOWS_PHONE8)
|
if (WINDOWS_PHONE8)
|
||||||
set(CONTENT_FILES ${CONTENT_FILES}
|
set(CONTENT_FILES ${CONTENT_FILES}
|
||||||
@@ -108,6 +109,7 @@ set(RESOURCE_FILES
|
|||||||
${CONTENT_FILES} ${DEBUG_CONTENT_FILES} ${RELEASE_CONTENT_FILES} ${ASSET_FILES} ${STRING_FILES}
|
${CONTENT_FILES} ${DEBUG_CONTENT_FILES} ${RELEASE_CONTENT_FILES} ${ASSET_FILES} ${STRING_FILES}
|
||||||
Direct3DApp1/Direct3DApp1_TemporaryKey.pfx)
|
Direct3DApp1/Direct3DApp1_TemporaryKey.pfx)
|
||||||
|
|
||||||
|
set_property(SOURCE ${COPY_TO_OUTPUT_FILES} PROPERTY VS_COPY_TO_OUT_DIR "PreserveNewest")
|
||||||
set_property(SOURCE ${CONTENT_FILES} PROPERTY VS_DEPLOYMENT_CONTENT 1)
|
set_property(SOURCE ${CONTENT_FILES} PROPERTY VS_DEPLOYMENT_CONTENT 1)
|
||||||
set_property(SOURCE ${ASSET_FILES} PROPERTY VS_DEPLOYMENT_CONTENT 1)
|
set_property(SOURCE ${ASSET_FILES} PROPERTY VS_DEPLOYMENT_CONTENT 1)
|
||||||
set_property(SOURCE ${ASSET_FILES} PROPERTY VS_DEPLOYMENT_LOCATION "Assets")
|
set_property(SOURCE ${ASSET_FILES} PROPERTY VS_DEPLOYMENT_LOCATION "Assets")
|
||||||
|
|||||||
@@ -17,6 +17,13 @@ CubeRenderer::CubeRenderer()
|
|||||||
// Create a new WinRT object to validate that we can link properly
|
// Create a new WinRT object to validate that we can link properly
|
||||||
Batman ^ hero = ref new Batman();
|
Batman ^ hero = ref new Batman();
|
||||||
hero->savePeople();
|
hero->savePeople();
|
||||||
|
|
||||||
|
// Test that .manifest files can be bundled with app
|
||||||
|
DX::ReadDataAsync("Direct3DApp1\\Simple.manifest")
|
||||||
|
.then([this](Platform::Array<byte> ^ fileData) {
|
||||||
|
std::string manifestContent(fileData->begin(), fileData->end());
|
||||||
|
assert(manifestContent.find("hello") == 0);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void CubeRenderer::CreateDeviceResources()
|
void CubeRenderer::CreateDeviceResources()
|
||||||
|
|||||||
1
Tests/VSWinStorePhone/Direct3DApp1/Simple.manifest
Normal file
1
Tests/VSWinStorePhone/Direct3DApp1/Simple.manifest
Normal file
@@ -0,0 +1 @@
|
|||||||
|
hello
|
||||||
Reference in New Issue
Block a user