vcpkg installation doesn't use its dependencies?
Opened this issue · 1 comments
DirectXTK vcpkg package doesn't seem to be correctly depending on DirectXMath package it lists in its dependencies.
I installed directxtk into my visual studio project via vcpkg.json, and I can access its headers via #include <directxtk/...>
which is correct and expected.
directxmath package is also appropriately downloaded and its headers can be accessed via #include <directxmath/...>
.
However, DirectXTK does not include the headers from DirectXMath. If we were to look, for example, into SimpleMath.h, we'd find
#include <DirectXMath.h>
#include <DirectXPackedVector.h>
#include <DirectXCollision.h>
This does not look like <directxmath/DirectXMath.h> etc.
As the results, the compiler searches for these files in other include directories, and, in my case, finds them inside the Windows SDK: C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\DirectXMath.h
is what it ends up including, which is a way older version of DirectXMath.
I had to resort to adding vcpkg_installed\x64-windows-static-md\x64-windows-static-md\include\directxmath\
to my Additional Include Directories in order to make those includes from DirectXTK prioritize the DirectXMath installed through vcpkg, which is, needless to say, less than ideal experience.
Actually I recently noticed this issue when using MSBuild+VCPKG (CMake+VCPKG works as expected).
I'm making a change to upstream microsoft/DirectXMath#224 and then will update vcpkg to use the newer port.