How to insure vcpkg install runs before my pre-build event in VS project? #43965
Unanswered
sergeibobyr
asked this question in
Q&A
Replies: 1 comment
-
I found that this issue was raised in #20830 but I do not see it fixed in any way. Am I missing something here? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I run protoc compiler as part of my pre-build event. To be 100% compatible I reference the protoc from the vcpkg_installed directory itself. To do that I need to ensure that vcpkg_installed directory is present and up to date according to vckpg.json. What is the right setup for this? As a workaround I call vcpkg install manually before the protoc call but what I see is that it's also called 2nd time after the pre-build event by VS (because vcpkg is enabled in settings). Here's my pre-build setup:
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
vcpkg install --x-wait-for-lock --clean-after-build --triplet "x86-windows" "--x-install-root=$(SolutionDir)\vcpkg_installed\"
..\vcpkg_installed\x86-windows\tools\protobuf\protoc.exe --proto_path=$(ProjectDir) --cpp_out=$(ProjectDir) $(ProjectDir)mqtt.proto
Beta Was this translation helpful? Give feedback.
All reactions