qt_add_win_app_sdk | Qt Core | Qt 6.11.1
Description: Adds the Windows App SDK library to the application.

- Qt 6.11
- Qt Core
- CMake Commands in Qt6 Core
- qt_add_win_app_sdk
- Qt 6.11.1 Reference Documentation

# qt_add_win_app_sdk

Adds the Windows App SDK library to the application.

The command is defined in the `Core` component of the `Qt6` package, which can be loaded like so:

     find_package(Qt6 REQUIRED COMPONENTS Core)

This command was introduced in Qt 6.9.

Note: This command is in technology preview and may change in future releases.

## Synopsis

     qt_add_win_app_sdk(<TARGET>)

Since 6.10:

     qt_add_win_app_sdk(<TARGET> [<PROPAGATION>])

If versionless commands are disabled, use `qt6_add_win_app_sdk()` instead. It supports the same set of arguments as this command.

## Description

Adds Windows App SDK include files to the project, and links the necessary libraries to the given CMake target. Windows App SDK is provided as a NuGet package so it can be easily used in managed apps. However, for unmanaged C++ applications we need header files. The function takes the following steps:

1. Tries to find the Windows App SDK and cppwinrt.exe tool
2. Generates Windows App SDK headers using the cppwinrt.exe tool
3. Includes those header files and links the library to the given CMake target

## Arguments

`PROPAGATION`

Specifies the propagation visibility of include directories, link directories, and linked libraries for the target. This argument is passed directly to the following CMake commands:

1. target_include_directories()
2. target_link_directories()
3. target_link_libraries()

It determines how these properties are applied to the target itself and whether they are propagated to other targets that link against it.

### Accepted values:

1. PRIVATE: The settings (include directories, link directories, and linked libraries) are applied only to the current target. They are not visible to targets that link against this one.
2. PUBLIC: The settings are applied to the current target and are also propagated to any target that links against it. Use this when the dependency is required both for building the target and for its consumers.
3. INTERFACE: The settings are not used when building the current target, but are propagated to targets that link against it. This is typically used for header-only libraries or interface targets that expose usage requirements without needing them for their own build.

### Notes

1. This argument is optional.
2. If omitted, the default behavior is equivalent to PRIVATE (or specify your actual default).
3. Use the appropriate propagation scope to accurately describe your target’s dependencies and usage requirements.

Warning: This command is not supported on non-MSVC platforms.