0027350: Support for Universal Windows Platform
[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 add_executable(uwp WIN32 ${SOURCE_FILES} ${HEADER_FILES} ${RESOURCE_FILES} ${XAML_FILES})
55
56 set_property(TARGET uwp PROPERTY VS_WINRT_COMPONENT TRUE)
57
58 set_property (TARGET uwp PROPERTY FOLDER Samples)
59
60 if (SINGLE_GENERATOR)
61   install (TARGETS uwp DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
62 else()
63   install (TARGETS uwp
64            CONFIGURATIONS Release RelWithDebInfo
65            DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
66   install (TARGETS uwp
67            CONFIGURATIONS Debug
68            DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}d")
69 endif()
70
71 #include_directories
72
73 # OCCT libraries for using
74 set (uwp_USED_LIBS        TKernel
75                           TKMath
76                           TKG2d
77                           TKG3d
78                           TKGeomBase
79                           TKBRep
80                           TKGeomAlgo
81                           TKTopAlgo
82                           TKPrim
83                           TKShHealing
84                           TKBO
85                           TKBool
86                           TKFillet
87                           TKMesh
88                           TKFeat
89                           TKHLR
90                           TKOffset
91                           TKXMesh
92                           TKIGES
93                           TKSTEP
94                           TKXSBase
95                           TKSTL
96 #                         TKVRML
97                           )
98
99 target_link_libraries (uwp ${uwp_USED_LIBS})