Adds support for vcpkg in Makefile.win #101
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for VCPKG_ROOT variable in Makefile.win. It checks that OpenCL headers can be found before use. In case VCPKG_ROOT is not defined / or no OpenCL SDK is built with vcpkg, it falls back to the OPENCLDIR detection.
I also write a script to retrieve vcpkg.exe and build the OpenCL SDK dependency (for x64 or x86) and set VCPKG_ROOT.
So a build with vcpkg can be like that (in a Developer Command Prompt terminal) :
I have tested with Visual Studio 2022 for x86 and x64 architectures with VCPKG_ROOT.
I also tested with the (now deprecated) AMDAPP / Intel OpenCL SDK, and the fetch-opencl-dev-win.cmd script (without VCPKG_ROOT environment variable).