From ed05f11dd27d668791887f32e2c7be00753cfdb5 Mon Sep 17 00:00:00 2001 From: Gilles Khouzam Date: Fri, 17 Jun 2016 14:24:21 -0700 Subject: VS: Add a VS_TOOL_OVERRIDE source file property This property allow to specify a specific Visual Studio tool for a source file overriding the default tool behavior. For example, a `.resw` file being processed as a `PriResource` file. This has the advantage of being able to teach CMake to process new file types without code modifications. --- Tests/VSWinStorePhone/CMakeLists.txt | 6 +- .../Direct3DApp1/Strings/en-US/Resources.resw | 123 +++++++++++++++++++++ 2 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 Tests/VSWinStorePhone/Direct3DApp1/Strings/en-US/Resources.resw (limited to 'Tests/VSWinStorePhone') diff --git a/Tests/VSWinStorePhone/CMakeLists.txt b/Tests/VSWinStorePhone/CMakeLists.txt index ae82755517..6b026fc707 100644 --- a/Tests/VSWinStorePhone/CMakeLists.txt +++ b/Tests/VSWinStorePhone/CMakeLists.txt @@ -98,13 +98,17 @@ elseif (NOT "${PLATFORM}" STREQUAL "DESKTOP") ) endif() +set(STRING_FILES + Direct3DApp1/Strings/en-US/Resources.resw) + set(RESOURCE_FILES - ${CONTENT_FILES} ${DEBUG_CONTENT_FILES} ${RELEASE_CONTENT_FILES} ${ASSET_FILES} + ${CONTENT_FILES} ${DEBUG_CONTENT_FILES} ${RELEASE_CONTENT_FILES} ${ASSET_FILES} ${STRING_FILES} Direct3DApp1/Direct3DApp1_TemporaryKey.pfx) 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") +set_property(SOURCE ${STRING_FILES} PROPERTY VS_TOOL_OVERRIDE "PRIResource") set_property(SOURCE ${DEBUG_CONTENT_FILES} PROPERTY VS_DEPLOYMENT_CONTENT $) set_property(SOURCE ${RELEASE_CONTENT_FILES} PROPERTY VS_DEPLOYMENT_CONTENT $,$,$>) diff --git a/Tests/VSWinStorePhone/Direct3DApp1/Strings/en-US/Resources.resw b/Tests/VSWinStorePhone/Direct3DApp1/Strings/en-US/Resources.resw new file mode 100644 index 0000000000..8c2c8ae4f7 --- /dev/null +++ b/Tests/VSWinStorePhone/Direct3DApp1/Strings/en-US/Resources.resw @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Test String + + -- cgit v1.2.1