1. Home
  2. ›
  3. Browse
  4. ›
  5. cppwinrt

cppwinrt

v3.0.260818.1#1Latest

C++/WinRT is a standard C++ language projection for the Windows Runtime.

Install

Run the following Vcpkg command to install the port.

vcpkg install cppwinrt

Usage

The C++/WinRT package provides CMake targets:

find_package(cppwinrt CONFIG REQUIRED)
target_link_libraries(main PRIVATE Microsoft::CppWinRT)

In addition, three variables are also exported: CPPWINRT_TOOL points to cppwinrt.exe; CPPWINRT_MODULE_FILES lists of paths to all module files; CPPWINRT_MODULE_BASE_DIR points to the directory of the module files.

When installed with the "modules" feature, CPPWINRT_MODULE_FILES lists the generated C++20 module interface files (.ixx). Add them to your target:

target_sources(main
    PRIVATE
        FILE_SET cxx_modules
        TYPE CXX_MODULES
        BASE_DIRS ${CPPWINRT_MODULE_BASE_DIR}
        FILES ${CPPWINRT_MODULE_FILES}
)

Features

See source

Version

v3.0.260818.1#1

Publication

Supports

windows

Homepage

github.com/microsoft/cppwinrt

Documentation

docs.microsoft.com/windows/uwp/cpp-and-winrt-apis

Subtree

8e89ad1130

License

MIT

Definition

Manifest