summaryrefslogtreecommitdiff
path: root/Tests/VSWinStorePhone
diff options
context:
space:
mode:
authorAron Yu <aron.yu@gmail.com>2022-02-03 08:25:38 +0100
committerAron Yu <aron.yu@gmail.com>2022-02-04 10:16:55 +0100
commitfeebc8394fd2aec2f4f876bab2f65879d8b1566c (patch)
treec5fb6552f1ab9a36631116d20652e9178d24011b /Tests/VSWinStorePhone
parent32afcf74afc08e4255d4c497929653d197802adc (diff)
downloadcmake-feebc8394fd2aec2f4f876bab2f65879d8b1566c.tar.gz
Windows: Allow manifest files to be bundled as content
Diffstat (limited to 'Tests/VSWinStorePhone')
-rw-r--r--Tests/VSWinStorePhone/CMakeLists.txt4
-rw-r--r--Tests/VSWinStorePhone/Direct3DApp1/CubeRenderer.cpp7
-rw-r--r--Tests/VSWinStorePhone/Direct3DApp1/Simple.manifest1
3 files changed, 11 insertions, 1 deletions
diff --git a/Tests/VSWinStorePhone/CMakeLists.txt b/Tests/VSWinStorePhone/CMakeLists.txt
index edd43308fe..2cb80faab4 100644
--- a/Tests/VSWinStorePhone/CMakeLists.txt
+++ b/Tests/VSWinStorePhone/CMakeLists.txt
@@ -63,7 +63,8 @@ set(VERTEXSHADER_FILES
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)
set(CONTENT_FILES ${CONTENT_FILES}
@@ -108,6 +109,7 @@ set(RESOURCE_FILES
${CONTENT_FILES} ${DEBUG_CONTENT_FILES} ${RELEASE_CONTENT_FILES} ${ASSET_FILES} ${STRING_FILES}
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 ${ASSET_FILES} PROPERTY VS_DEPLOYMENT_CONTENT 1)
set_property(SOURCE ${ASSET_FILES} PROPERTY VS_DEPLOYMENT_LOCATION "Assets")
diff --git a/Tests/VSWinStorePhone/Direct3DApp1/CubeRenderer.cpp b/Tests/VSWinStorePhone/Direct3DApp1/CubeRenderer.cpp
index 595f55392b..d28785724d 100644
--- a/Tests/VSWinStorePhone/Direct3DApp1/CubeRenderer.cpp
+++ b/Tests/VSWinStorePhone/Direct3DApp1/CubeRenderer.cpp
@@ -17,6 +17,13 @@ CubeRenderer::CubeRenderer()
// Create a new WinRT object to validate that we can link properly
Batman ^ hero = ref new Batman();
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()
diff --git a/Tests/VSWinStorePhone/Direct3DApp1/Simple.manifest b/Tests/VSWinStorePhone/Direct3DApp1/Simple.manifest
new file mode 100644
index 0000000000..ce01362503
--- /dev/null
+++ b/Tests/VSWinStorePhone/Direct3DApp1/Simple.manifest
@@ -0,0 +1 @@
+hello