Skip to content

Commit bfca44f

Browse files
telezhnayadscho
authored andcommitted
vcxproj: change build logic
Add new condition to invoke vcpkg_install.bat: it's not enough to check the presence of folder vcpkg. We need to check the presence of some header files because this is one of the main goals of this script. Previous build attempt could be aborted, so the folder will exist but the project will not be built properly. Signed-off-by: Olga Telezhnaia <[email protected]>
1 parent 7296665 commit bfca44f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contrib/buildsystems/Generators/Vcxproj.pm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,9 @@ sub createProject {
179179
EOM
180180
if ($target eq 'libgit') {
181181
print F << "EOM";
182-
<PreBuildEvent Condition="!Exists('$cdup\\compat\\vcbuild\\vcpkg')">
182+
<PreBuildEvent Condition="!Exists('$cdup\\compat\\vcbuild\\vcpkg') OR (!Exists('$cdup\\compat\\vcbuild\\vcpkg\\installed\\x64-windows\\include\\openssl\\ssl.h') AND !Exists('$cdup\\compat\\vcbuild\\vcpkg\\installed\\x86-windows\\include\\openssl\\ssl.h'))">
183183
<Message>Initialize VCPKG</Message>
184+
<Command>del "$cdup\\compat\\vcbuild\\vcpkg"</Command>
184185
<Command>call "$cdup\\compat\\vcbuild\\vcpkg_install.bat" </Command>
185186
</PreBuildEvent>
186187
EOM

0 commit comments

Comments
 (0)