summaryrefslogtreecommitdiff
path: root/Tests/VSWinStorePhone
diff options
context:
space:
mode:
authorGilles Khouzam <gillesk@microsoft.com>2015-10-02 11:34:55 -0700
committerBrad King <brad.king@kitware.com>2015-10-05 09:48:11 -0400
commit1be2f12cf241f0d46095e17a561cd70da49ff549 (patch)
treeb3b1cf9dfe6b8211f3548838a9ab41fe7121ee40 /Tests/VSWinStorePhone
parent2798dbdacbc8a3c4648d61c0a73a3b5791ccf593 (diff)
downloadcmake-1be2f12cf241f0d46095e17a561cd70da49ff549.tar.gz
VS: Add support for Windows 10 Universal (Store) Applications
Teach the VS 2015 generator to support WindowsStore 10.0 applications. Add target properties to customize them: * VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION: Specifies the minimum version of the OS that the project can target. * VS_DESKTOP_EXTENSIONS_VERSION, VS_MOBILE_EXTENSIONS_VERSIONS, VS_IOT_EXTENSIONS_VERSION: Add a reference to the version of the SDK specified to the target allowing to target the extended functionality in a universal project. * VS_IOT_STARTUP_TASK: Specifies that the target should be built as an IOT continuous background task.
Diffstat (limited to 'Tests/VSWinStorePhone')
-rw-r--r--Tests/VSWinStorePhone/CMakeLists.txt17
-rw-r--r--Tests/VSWinStorePhone/Direct3DApp1/Assets/SmallLogo44x44.pngbin0 -> 554 bytes
-rw-r--r--Tests/VSWinStorePhone/cmake/Package_vc14.store.appxmanifest.in36
3 files changed, 51 insertions, 2 deletions
diff --git a/Tests/VSWinStorePhone/CMakeLists.txt b/Tests/VSWinStorePhone/CMakeLists.txt
index 8357d5f47d..ae82755517 100644
--- a/Tests/VSWinStorePhone/CMakeLists.txt
+++ b/Tests/VSWinStorePhone/CMakeLists.txt
@@ -1,7 +1,8 @@
cmake_minimum_required(VERSION 3.0)
project(VSWinStorePhone)
-
-if(MSVC_VERSION GREATER 1700)
+if(MSVC_VERSION GREATER 1899)
+ set(COMPILER_VERSION "14")
+elseif(MSVC_VERSION GREATER 1700)
set(COMPILER_VERSION "12")
elseif(MSVC_VERSION GREATER 1600)
set(COMPILER_VERSION "11")
@@ -91,6 +92,7 @@ elseif (NOT "${PLATFORM}" STREQUAL "DESKTOP")
set(ASSET_FILES ${ASSET_FILES}
Direct3DApp1/Assets/Logo.png
Direct3DApp1/Assets/SmallLogo.png
+ Direct3DApp1/Assets/SmallLogo44x44.png
Direct3DApp1/Assets/SplashScreen.png
Direct3DApp1/Assets/StoreLogo.png
)
@@ -124,4 +126,15 @@ source_group("Resource Files" FILES ${RESOURCE_FILES})
add_executable(${EXE_NAME} WIN32 ${SOURCE_FILES} ${HEADER_FILES} ${RESOURCE_FILES})
set_property(TARGET ${EXE_NAME} PROPERTY VS_WINRT_COMPONENT TRUE)
+
+string(SUBSTRING "${CMAKE_SYSTEM_VERSION}" 0, 4, SHORT_VERSION)
+
+if("${SHORT_VERSION}" STREQUAL "10.0")
+ message(STATUS "Targeting Windows 10. Setting Extensions to version ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
+ set_property(TARGET ${EXE_NAME} PROPERTY VS_DESKTOP_EXTENSIONS_VERSION "${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
+ set_property(TARGET ${EXE_NAME} PROPERTY VS_MOBILE_EXTENSIONS_VERSION "${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
+ set_property(TARGET ${EXE_NAME} PROPERTY VS_IOT_EXTENSIONS_VERSION "${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
+endif()
+
+
target_link_libraries(${EXE_NAME} d3d11)
diff --git a/Tests/VSWinStorePhone/Direct3DApp1/Assets/SmallLogo44x44.png b/Tests/VSWinStorePhone/Direct3DApp1/Assets/SmallLogo44x44.png
new file mode 100644
index 0000000000..28810b7c0e
--- /dev/null
+++ b/Tests/VSWinStorePhone/Direct3DApp1/Assets/SmallLogo44x44.png
Binary files differ
diff --git a/Tests/VSWinStorePhone/cmake/Package_vc14.store.appxmanifest.in b/Tests/VSWinStorePhone/cmake/Package_vc14.store.appxmanifest.in
new file mode 100644
index 0000000000..6b27ab71b1
--- /dev/null
+++ b/Tests/VSWinStorePhone/cmake/Package_vc14.store.appxmanifest.in
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Package
+ xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
+ xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
+ xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
+ IgnorableNamespaces="uap mp">
+
+ <Identity Name="@PACKAGE_GUID@" Publisher="CN=mgong" Version="1.1.0.0" />
+ <mp:PhoneIdentity PhoneProductId="@PACKAGE_GUID@" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
+
+ <Properties>
+ <DisplayName>@SHORT_NAME@</DisplayName>
+ <PublisherDisplayName>mgong</PublisherDisplayName>
+ <Logo>Assets/StoreLogo.png</Logo>
+ </Properties>
+
+ <Dependencies>
+ <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.65535.65535" />
+ </Dependencies>
+
+ <Resources>
+ <Resource Language="x-generate" />
+ </Resources>
+ <Applications>
+ <Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="@SHORT_NAME@.App">
+ <uap:VisualElements
+ DisplayName="@SHORT_NAME@"
+ Description="@SHORT_NAME@"
+ BackgroundColor="#336699"
+ Square150x150Logo="Assets/Logo.png"
+ Square44x44Logo="Assets/SmallLogo44x44.png">
+ <uap:SplashScreen Image="Assets/SplashScreen.png" />
+ </uap:VisualElements>
+ </Application>
+ </Applications>
+</Package>