How to make vcpkg in visual studio ignore specific libraries

  angle, c++, opengl, vcpkg, visual-studio

I have two different configurations of a project and I wish to link one against one against windows’ standard opengl32.lib and the other against Angle.
The trouble is, both of these libraries implement the OpenGL interface and I see no way of choosing between them other than removing one library from vcpkg. It seems to prefer Angle.
I’ve tried setting the angle libraries ‘no default libs’ in the project settings and also using

#pragma comment(linker,"/nodefaultlib:libANGLE.lib")
#pragma comment(linker,"/nodefaultlib:libEGL.lib")
#pragma comment(linker,"/nodefaultlib:libGLESv2.lib")

within the source but these don’t seem to be respected by whatever magic black box handles vcpkg linking (and, usually, I’m very grateful for that black box)

Is it possible to get vcpkg to ignore a set of libraries within a specific project configuration?

Source: Windows Questions C++

LEAVE A COMMENT