summaryrefslogtreecommitdiffstats
path: root/Tests/VSWinStorePhone/CMakeLists.txt
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/VSWinStorePhone/CMakeLists.txt
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/VSWinStorePhone/CMakeLists.txt')
-rw-r--r--Tests/VSWinStorePhone/CMakeLists.txt17
1 files changed, 15 insertions, 2 deletions
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)