1

I need to be able set VCPKG_TARGET_TRIPLET inside my CMakeLists.txt due to my setup (see my post here: Setting "-D" variables inside CMake) but I cannot get it working.

It works if I pass "x64-mingw-static" as a -D argument, but not if I set it manually. The packages are simply not found in this case.

Any thoughts?

Gary Allen
  • 1,218
  • 1
  • 13
  • 28

1 Answers1

1

Try set(VCPKG_TARGET_TRIPLET <yourvalue> CACHE STRING "")

the behavior you observed was probably fixed by https://github.com/microsoft/vcpkg/pull/13713

and you used set(VCPKG_TARGET_TRIPLET <yourvalue>)

Be aware that changing the triplet in an already present cmake cache requires a complete clean reconfigure due to way cmake works.

Alexander Neumann
  • 1,479
  • 8
  • 17