0031939: Coding - correction of spelling errors in comments [part 2]
[occt.git] / samples / xaml / CMakeLists.txt
1 cmake_minimum_required(VERSION 3.4.0)
2 project(uwp)
3
4 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
5
6 set(SOURCE_FILES
7   App.xaml.cpp
8   MainPage.xaml.cpp
9   pch.cpp
10   )
11
12 set(HEADER_FILES
13   App.xaml.h
14   MainPage.xaml.h
15   pch.h
16   )
17
18 set(XAML_FILES
19   App.xaml
20   MainPage.xaml
21   )
22
23 set(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
33 set(CONTENT_FILES
34     Package.appxmanifest
35     )
36
37 set(RESOURCE_FILES
38   ${CONTENT_FILES} ${ASSET_FILES}
39   uwp_TemporaryKey.pfx)
40
41 include_directories(${CMAKE_CURRENT_SOURCE_DIR})
42
43 set_property(SOURCE ${CONTENT_FILES} PROPERTY VS_DEPLOYMENT_CONTENT 1)
44 set_property(SOURCE ${ASSET_FILES} PROPERTY VS_DEPLOYMENT_CONTENT 1)
45 set_property(SOURCE ${ASSET_FILES} PROPERTY VS_DEPLOYMENT_LOCATION "Assets")
46
47 set_property(SOURCE "App.xaml" PROPERTY VS_XAML_TYPE "ApplicationDefinition")
48
49 source_group("Source Files" FILES ${SOURCE_FILES})
50 source_group("Header Files" FILES ${HEADER_FILES})
51 source_group("Resource Files" FILES ${RESOURCE_FILES})
52 source_group("Xaml Files" FILES ${XAML_FILES})
53
54 if (USE_FREETYPE)
55   list (APPEND 3RDPARTY_DLLS "${3RDPARTY_FREETYPE_DLL}")
56   set_property(SOURCE ${3RDPARTY_DLLS} PROPERTY VS_DEPLOYMENT_CONTENT 1)
57 endif()
58
59 add_executable(uwp WIN32 ${SOURCE_FILES} ${HEADER_FILES} ${RESOURCE_FILES} ${XAML_FILES} ${3RDPARTY_DLLS})
60
61 set_property(TARGET uwp PROPERTY VS_WINRT_COMPONENT TRUE)
62
63 # Set Visual Studio Windows target platform minimum version equal to OS version
64 string(REGEX MATCH "^([0-9]+\.[0-9]+\.[0-9]+)$" PLATFORM_WO_DEV_VER "${CMAKE_HOST_SYSTEM_VERSION}")
65 if (PLATFORM_WO_DEV_VER)
66   # Add tailing zero to platform version 10.0.14393 -> 10.0.14393.0 to have correct version
67   set (CMAKE_HOST_SYSTEM_VERSION "${CMAKE_HOST_SYSTEM_VERSION}.0")
68 endif()
69 set_property(TARGET uwp PROPERTY VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION "${CMAKE_HOST_SYSTEM_VERSION}")
70
71 set_property (TARGET uwp PROPERTY FOLDER Samples)
72
73 if (SINGLE_GENERATOR)
74   install (TARGETS uwp DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
75 else()
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")
82 endif()
83
84 #include_directories
85
86 # OCCT libraries for using
87 set (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
109                           TKVRML
110                           )
111
112 target_link_libraries (uwp ${uwp_USED_LIBS})