From 8184522c6da62f0ac977e43b353d7103702817c9 Mon Sep 17 00:00:00 2001 From: Rafael Kitover Date: Wed, 13 Dec 2023 14:50:54 +0000 Subject: [PATCH] build: don't use vcpkg on non-WIN32 w/o triplet Fix the logic in the vcpkg automatic support to return on non-WIN32 if VCPKG_TARGET_TRIPLET is not defined. Signed-off-by: Rafael Kitover --- cmake/Set-Toolchain-vcpkg.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/Set-Toolchain-vcpkg.cmake b/cmake/Set-Toolchain-vcpkg.cmake index f0bab6b7..48b03f43 100644 --- a/cmake/Set-Toolchain-vcpkg.cmake +++ b/cmake/Set-Toolchain-vcpkg.cmake @@ -6,7 +6,11 @@ if(POLICY CMP0135) cmake_policy(SET CMP0135 NEW) # Use timestamps from archives. endif() -if(NOT DEFINED VCPKG_TARGET_TRIPLET AND WIN32) +if(NOT DEFINED VCPKG_TARGET_TRIPLET) + if(NOT WIN32) + return() + endif() + # Check if we are in an MSVC environment. find_program(cl_exe_path NAME cl.exe HINTS ENV PATH)