diff options
author | Gilles Khouzam <gillesk@microsoft.com> | 2015-03-31 20:49:39 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-04-03 17:40:35 (GMT) |
commit | 01a9ab0def07ecddbc1bdfa67fec1bd3e6d030ea (patch) | |
tree | d5ae25dcf79d63031f26f2b879a30c19d388020f /Tests/VSXaml/CMakeLists.txt | |
parent | 84136c5a83bf9e1caf158a37f987465a8f39f8d0 (diff) | |
download | CMake-01a9ab0def07ecddbc1bdfa67fec1bd3e6d030ea.zip CMake-01a9ab0def07ecddbc1bdfa67fec1bd3e6d030ea.tar.gz CMake-01a9ab0def07ecddbc1bdfa67fec1bd3e6d030ea.tar.bz2 |
VS: Add support for XAML source files
XAML files are by default of type Page in the vcxproj and can be
overriden by setting the VS_XAML_TYPE property. The .cpp and .h file
of the same name are automatically added as depending on the XAML file.
New VSXaml test builds a basic XAML WindowsStore 8.1 app with VS2013.
Diffstat (limited to 'Tests/VSXaml/CMakeLists.txt')
-rw-r--r-- | Tests/VSXaml/CMakeLists.txt | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/Tests/VSXaml/CMakeLists.txt b/Tests/VSXaml/CMakeLists.txt new file mode 100644 index 0000000..f384c82 --- /dev/null +++ b/Tests/VSXaml/CMakeLists.txt @@ -0,0 +1,52 @@ +cmake_minimum_required(VERSION 3.2) +project(VSXaml) + +set_property(GLOBAL PROPERTY USE_FOLDERS ON) + +set(SOURCE_FILES + App.xaml.cpp + MainPage.xaml.cpp + pch.cpp + ) + +set(HEADER_FILES + App.xaml.h + MainPage.xaml.h + pch.h + ) + +set(XAML_FILES + App.xaml + MainPage.xaml + ) + +set(ASSET_FILES + Assets/Logo.scale-100.png + Assets/SmallLogo.scale-100.png + Assets/SplashScreen.scale-100.png + Assets/StoreLogo.scale-100.png + ) + +set(CONTENT_FILES + Package.appxmanifest + ) + +set(RESOURCE_FILES + ${CONTENT_FILES} ${ASSET_FILES} + VSXaml_TemporaryKey.pfx) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) + +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 "App.xaml" PROPERTY VS_XAML_TYPE "ApplicationDefinition") + +source_group("Source Files" FILES ${SOURCE_FILES}) +source_group("Header Files" FILES ${HEADER_FILES}) +source_group("Resource Files" FILES ${RESOURCE_FILES}) +source_group("Xaml Files" FILES ${XAML_FILES}) + +add_executable(VSXaml WIN32 ${SOURCE_FILES} ${HEADER_FILES} ${RESOURCE_FILES} ${XAML_FILES}) +set_property(TARGET VSXaml PROPERTY VS_WINRT_COMPONENT TRUE) |