microsoft / MIDI

Windows MIDI Services
MIT License
285 stars 23 forks source link

vcpkg support for libmidi2 #322

Closed Psychlist1972 closed 2 months ago

ErhanAtesoglu commented 2 months ago

Hi Pete,

I have just about everything setup on my end, but the recent changes have caused the following build issue. The vcpkg is installed, for example C:\git\midi\src\api\Transform\UMPToByteStream\vcpkg_installed\x64-windows\include\libmidi2 on my machine.

Also are debug versions of this libmidi2.lib a thing?

builderrors

Psychlist1972 commented 2 months ago

Easiest way to deal with vcpkg is to use the Visual Studio 2022 integration. If you don't have that, you can download and build vcpkg yourself.

image

https://learn.microsoft.com/vcpkg/get_started/get-started-msbuild

  1. Make sure the project has this property set. You need to have the vcpkg workload in visual studio installer installed

image

  1. the json file is checked in, so you don't need to do the first two steps, but you do need to x-update-baseline and install. To have the vcpkg command resolved, you need to do this from a Visual Studio Command Prompt instance.

image

image

IIRC, you can set vcpkg options for whether you want debug or release builds. It's set for release here.

ErhanAtesoglu commented 2 months ago

Thanks, I got the release build working fine after properly installing and using vcpkg.