nefarius / ViGEmClient

ViGEm Client SDK for feeder development.
https://docs.nefarius.at/projects/ViGEm/
MIT License
134 stars 65 forks source link

Resolve output paths relative to .vcxproj rather than .sln #17

Closed awforsythe closed 2 years ago

awforsythe commented 2 years ago

If you build ViGEmClient on its own (through Visual Studio), you'll end up with a directory structure like this, where output files are written to top-level directories called bin (for DLLs) or lib (for static libs), e.g.:

I cloned ViGEmClient into my own project as a submodule, giving me a directory structure like this:

To simplify the build process within Visual Studio, I added the project (ViGEmClient.vcxproj) to my solution (myproject.sln). However, I noticed that when I build ViGEmClient to generate static libs, they end up in an unexpected location:

This is simply because the output directories configured in ViGEmClient.vcxproj are defined relative to $(SolutionDir). This change updates those paths to be resolved relative to $(ProjectDir), so that output files always end up in the expected locations (ViGEmClient/lib or ViGEmClient/bin) regardless of whether the library is built on its own or within another solution.

Thanks!

nefarius commented 2 years ago

Neat, thanks!