Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vcpkg installation doesn't use its dependencies? #514

Open
xvwyh opened this issue Nov 29, 2024 · 1 comment
Open

vcpkg installation doesn't use its dependencies? #514

xvwyh opened this issue Nov 29, 2024 · 1 comment
Labels
bug math Related to the SimpleMath wrapper for DirectXMath

Comments

@xvwyh
Copy link

xvwyh commented Nov 29, 2024

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.

@xvwyh xvwyh changed the title vcpkg installation includes wrong dependencies? vcpkg installation doesn't use its dependencies? Nov 29, 2024
@walbourn
Copy link
Member

walbourn commented Dec 2, 2024

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.

@walbourn walbourn added bug math Related to the SimpleMath wrapper for DirectXMath labels Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug math Related to the SimpleMath wrapper for DirectXMath
Projects
None yet
Development

No branches or pull requests

2 participants