-
Notifications
You must be signed in to change notification settings - Fork 319
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
33 lines (28 loc) · 1.4 KB
/
CMakeLists.txt
File metadata and controls
33 lines (28 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#----------------------------------------------------------------------------------------------------------------------
# PackagedFrameworkDependent - Framework-dependent deployment with MSIX packaging
#
# After building, register the MSIX layout and launch via AUMID:
# Add-AppxPackage -Register <build-dir>\PackagedFrameworkDependent\AppxManifest.xml
# Start-Process "shell:AppsFolder\<PFN>!App"
#----------------------------------------------------------------------------------------------------------------------
project(PackagedFrameworkDependent LANGUAGES CXX)
add_executable(PackagedFrameworkDependent WIN32
main.cpp
)
# Framework-dependent: use dynamic CRT
set_target_properties(PackagedFrameworkDependent PROPERTIES
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL"
)
# Use Foundation_Framework but without bootstrapper (MSIX provides framework package via package graph)
target_link_libraries(PackagedFrameworkDependent
PRIVATE
Microsoft.WindowsAppSDK.Foundation_Framework
)
post_build_runtime_dll_copy(PackagedFrameworkDependent)
# Copy AppxManifest.xml and Logo to the output directory for MSIX registration
add_custom_command(TARGET PackagedFrameworkDependent POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_CURRENT_SOURCE_DIR}/AppxManifest.xml
${CMAKE_CURRENT_SOURCE_DIR}/Logo.png
$<TARGET_FILE_DIR:PackagedFrameworkDependent>
)