# How include \*.winmd file in VS project with cmake?

**URL:** <https://discourse.cmake.org/t/how-include-winmd-file-in-vs-project-with-cmake/6242>\
**Category:** Code\
**Tags:** os:windows\
**Created:** [August 11, 2022, 11:41am UTC](https://discourse.cmake.org/t/how-include-winmd-file-in-vs-project-with-cmake/6242 "2022-08-11T11:41:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Konstantin\_Bartashev](https://discourse.cmake.org/user_avatar/discourse.cmake.org/konstantin_bartashev/32/2662_2.png) [@Konstantin\_Bartashev](https://discourse.cmake.org/u/Konstantin_Bartashev)\
**Post date:** [August 11, 2022, 11:41am UTC](https://discourse.cmake.org/t/how-include-winmd-file-in-vs-project-with-cmake/6242/1 "2022-08-11T11:41:55Z")

</div>

I have already try:  
`set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -AI\"C:/Path/to/winmd/file.winmd\"")`  
and try _target\_link\_libraries_:  
`target_link_libraries(${APP_TARGET_NAME} C:/Path/to/winmd/file.winmd`  
didn’t works.

In Visual Studio project of example the same winmd file attached in “References” section.
