summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorGilles Khouzam <gillesk@microsoft.com>2015-10-02 18:34:55 (GMT)
committerBrad King <brad.king@kitware.com>2015-10-05 13:48:11 (GMT)
commit1be2f12cf241f0d46095e17a561cd70da49ff549 (patch)
treeb3b1cf9dfe6b8211f3548838a9ab41fe7121ee40 /Tests
parent2798dbdacbc8a3c4648d61c0a73a3b5791ccf593 (diff)
downloadCMake-1be2f12cf241f0d46095e17a561cd70da49ff549.zip
CMake-1be2f12cf241f0d46095e17a561cd70da49ff549.tar.gz
CMake-1be2f12cf241f0d46095e17a561cd70da49ff549.tar.bz2
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')
-rw-r--r--Tests/CMakeLists.txt9
-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
4 files changed, 59 insertions, 3 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index dc65a2e..c82cb68 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1955,13 +1955,15 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
set(reg_vs10 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;InstallDir]")
set(reg_vs11 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0;InstallDir]")
set(reg_vs12 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\12.0;InstallDir]")
+ set(reg_vs14 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot10]")
set(reg_ws80 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v8.0;InstallationFolder]")
set(reg_ws81 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v8.1;InstallationFolder]")
+ set(reg_ws10_0 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\14.0\\Setup\\Build Tools for Windows 10;srcPath]")
set(reg_wp80 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\WindowsPhone\\v8.0;InstallationFolder]")
set(reg_wp81 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\WindowsPhone\\v8.1;InstallationFolder]")
select_wince_sdk(reg_wince wince_sdk)
set(reg_tegra "[HKEY_LOCAL_MACHINE\\SOFTWARE\\NVIDIA Corporation\\Nsight Tegra;sdkRoot]")
- foreach(reg vs10 vs11 vs12 ws80 ws81 wp80 wp81 wince tegra)
+ foreach(reg vs10 vs11 vs12 vs14 ws80 ws81 ws10_0 wp80 wp81 wince tegra)
get_filename_component(r "${reg_${reg}}" ABSOLUTE)
if(IS_DIRECTORY "${r}")
set(${reg} 1)
@@ -2008,6 +2010,11 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
-DCMAKE_SYSTEM_VERSION=8.1
)
endif()
+ if(vs14 AND ws10_0)
+ add_test_VSWinStorePhone(vs14-store10_0-X86 "Visual Studio 14 2015" WindowsStore 10.0)
+ add_test_VSWinStorePhone(vs14-store10_0-ARM "Visual Studio 14 2015 ARM" WindowsStore 10.0)
+ add_test_VSWinStorePhone(vs14-store10_0-X64 "Visual Studio 14 2015 Win64" WindowsStore 10.0)
+ endif()
if(vs11 AND wp80)
add_test_VSWinStorePhone(vs11-phone80-X86 "Visual Studio 11 2012" WindowsPhone 8.0)
add_test_VSWinStorePhone(vs11-phone80-ARM "Visual Studio 11 2012 ARM" WindowsPhone 8.0)
diff --git a/Tests/VSWinStorePhone/CMakeLists.txt b/Tests/VSWinStorePhone/CMakeLists.txt
index 8357d5f..ae82755 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 0000000..28810b7
--- /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 0000000..6b27ab7
--- /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>