0032137: Coding Rules - merge redundant .lxx files into header files within Package gp
[occt.git] / samples / xaml / CMakeLists.txt
CommitLineData
742cc8b0 1cmake_minimum_required(VERSION 3.4.0)
2project(uwp)
3
4set_property(GLOBAL PROPERTY USE_FOLDERS ON)
5
6set(SOURCE_FILES
7 App.xaml.cpp
8 MainPage.xaml.cpp
9 pch.cpp
10 )
11
12set(HEADER_FILES
13 App.xaml.h
14 MainPage.xaml.h
15 pch.h
16 )
17
18set(XAML_FILES
19 App.xaml
20 MainPage.xaml
21 )
22
23set(ASSET_FILES
24 Assets/LockScreenLogo.scale-200.png
25 Assets/SplashScreen.scale-200.png
26 Assets/Square150x150Logo.scale-200.png
27 Assets/Square44x44Logo.scale-200.png
28 Assets/Square44x44Logo.targetsize-24_altform-unplated.png
29 Assets/StoreLogo.png
30 Assets/Wide310x150Logo.scale-200.png
31 )
32
33set(CONTENT_FILES
34 Package.appxmanifest
35 )
36
37set(RESOURCE_FILES
38 ${CONTENT_FILES} ${ASSET_FILES}
39 uwp_TemporaryKey.pfx)
40
41include_directories(${CMAKE_CURRENT_SOURCE_DIR})
42
43set_property(SOURCE ${CONTENT_FILES} PROPERTY VS_DEPLOYMENT_CONTENT 1)
44set_property(SOURCE ${ASSET_FILES} PROPERTY VS_DEPLOYMENT_CONTENT 1)
45set_property(SOURCE ${ASSET_FILES} PROPERTY VS_DEPLOYMENT_LOCATION "Assets")
46
47set_property(SOURCE "App.xaml" PROPERTY VS_XAML_TYPE "ApplicationDefinition")
48
49source_group("Source Files" FILES ${SOURCE_FILES})
50source_group("Header Files" FILES ${HEADER_FILES})
51source_group("Resource Files" FILES ${RESOURCE_FILES})
52source_group("Xaml Files" FILES ${XAML_FILES})
53
1ae83f57 54if (USE_FREETYPE)
55 list (APPEND 3RDPARTY_DLLS "${3RDPARTY_FREETYPE_DLL}")
56 set_property(SOURCE ${3RDPARTY_DLLS} PROPERTY VS_DEPLOYMENT_CONTENT 1)
57endif()
58
59add_executable(uwp WIN32 ${SOURCE_FILES} ${HEADER_FILES} ${RESOURCE_FILES} ${XAML_FILES} ${3RDPARTY_DLLS})
742cc8b0 60
61set_property(TARGET uwp PROPERTY VS_WINRT_COMPONENT TRUE)
62
1ae83f57 63# Set Visual Studio Windows target platform minimum version equal to OS version
64string(REGEX MATCH "^([0-9]+\.[0-9]+\.[0-9]+)$" PLATFORM_WO_DEV_VER "${CMAKE_HOST_SYSTEM_VERSION}")
65if (PLATFORM_WO_DEV_VER)
a110c4a3 66 # Add tailing zero to platform version 10.0.14393 -> 10.0.14393.0 to have correct version
1ae83f57 67 set (CMAKE_HOST_SYSTEM_VERSION "${CMAKE_HOST_SYSTEM_VERSION}.0")
68endif()
69set_property(TARGET uwp PROPERTY VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION "${CMAKE_HOST_SYSTEM_VERSION}")
70
742cc8b0 71set_property (TARGET uwp PROPERTY FOLDER Samples)
72
73if (SINGLE_GENERATOR)
74 install (TARGETS uwp DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
75else()
76 install (TARGETS uwp
77 CONFIGURATIONS Release RelWithDebInfo
78 DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
79 install (TARGETS uwp
80 CONFIGURATIONS Debug
81 DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}d")
82endif()
83
84#include_directories
85
86# OCCT libraries for using
87set (uwp_USED_LIBS TKernel
88 TKMath
89 TKG2d
90 TKG3d
91 TKGeomBase
92 TKBRep
93 TKGeomAlgo
94 TKTopAlgo
95 TKPrim
96 TKShHealing
97 TKBO
98 TKBool
99 TKFillet
100 TKMesh
101 TKFeat
102 TKHLR
103 TKOffset
104 TKXMesh
105 TKIGES
106 TKSTEP
107 TKXSBase
108 TKSTL
1ae83f57 109 TKVRML
742cc8b0 110 )
111
1ae83f57 112target_link_libraries (uwp ${uwp_USED_LIBS})