Skip to content

Incorrect WinRT header paths when used from custom external libraries #1422

Closed Answered by rh101
rh101 asked this question in Q&A
Discussion options

You must be logged in to vote

Adding the following to each library CMakeLists.txt seems to have fixed this particular issue:

if (WINRT)
    set_property(TARGET ${target} PROPERTY VS_PROJECT_IMPORT ${CMAKE_BINARY_DIR}/packages/Microsoft.Windows.CppWinRT/build/native/Microsoft.Windows.CppWinRT.props)
    target_link_libraries(${target} PRIVATE ${CMAKE_BINARY_DIR}/packages/Microsoft.Windows.CppWinRT/build/native/Microsoft.Windows.CppWinRT.targets)
endif()

Replies: 1 comment

Comment options

rh101
Nov 7, 2023
Collaborator Author

You must be logged in to vote
0 replies
Answer selected by halx99
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant