Fix optional deps in vcpkg script.

Before installing optional deps, check that the associated variable is
either unset or true.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2020-08-19 09:59:29 +00:00
parent 3052eb33a5
commit dcaa18aae4
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 2 additions and 1 deletions

View File

@ -209,10 +209,11 @@ function(vcpkg_set_toolchain)
math(EXPR var_idx "${i} + 1")
list(GET VCPKG_DEPS_OPTIONAL ${var_idx} var)
set(val "${${var}}")
vcpkg_seconds()
if(seconds LESS time_limit)
if(seconds LESS time_limit AND (val OR val STREQUAL ""))
set(dep_qualified "${dep}:${VCPKG_TARGET_TRIPLET}")
execute_process(