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:
parent
3052eb33a5
commit
dcaa18aae4
|
@ -209,10 +209,11 @@ function(vcpkg_set_toolchain)
|
||||||
math(EXPR var_idx "${i} + 1")
|
math(EXPR var_idx "${i} + 1")
|
||||||
|
|
||||||
list(GET VCPKG_DEPS_OPTIONAL ${var_idx} var)
|
list(GET VCPKG_DEPS_OPTIONAL ${var_idx} var)
|
||||||
|
set(val "${${var}}")
|
||||||
|
|
||||||
vcpkg_seconds()
|
vcpkg_seconds()
|
||||||
|
|
||||||
if(seconds LESS time_limit)
|
if(seconds LESS time_limit AND (val OR val STREQUAL ""))
|
||||||
set(dep_qualified "${dep}:${VCPKG_TARGET_TRIPLET}")
|
set(dep_qualified "${dep}:${VCPKG_TARGET_TRIPLET}")
|
||||||
|
|
||||||
execute_process(
|
execute_process(
|
||||||
|
|
Loading…
Reference in New Issue