I am trying to install pugixml
using vcpkg
and linking to it using cmake
. I want to use it on windows and therefor want to use wchar_t
instead of char
. I know that pugixml
has a compiler flag for this (-DPUGIXML_WCHAR_MODE
), since I have managed to use it using FetchContent previously.
However, when installing and linking to pugixml
which was installed using vcpkg, I receive error:
error LNK2001: unresolved external symbol
The error is (most likely) appearing because there is a mismatch between my project and the installed project from vcpkg
.
I could successfully build pugixml
with my project when loading and linking to it using FetchContent
, and passing my own compiler flags (-DPUGIXML_WCHAR_MODE
).
My question is, is it possible to pass compiler flags to vcpkg
when installing a package?