From dcaa18aae4e1937f5296bb7e584b60f2f4bffa80 Mon Sep 17 00:00:00 2001 From: Rafael Kitover Date: Wed, 19 Aug 2020 09:59:29 +0000 Subject: [PATCH] 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 --- cmake/Set-Toolchain-vcpkg.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/Set-Toolchain-vcpkg.cmake b/cmake/Set-Toolchain-vcpkg.cmake index def8422f..d5bdb933 100644 --- a/cmake/Set-Toolchain-vcpkg.cmake +++ b/cmake/Set-Toolchain-vcpkg.cmake @@ -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(