C++/WinRT is a standard C++ language projection for the Windows Runtime.
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}
)
Enables Fast ABI feature for both consuming and producing projections.
Provides C++ modules for C++/WinRT. The modules are named winrt.Ns.X.
Links the WindowsApp.lib umbrella library for Windows Runtime.
v3.0.260818.1#1
windows
MIT
Manifest