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 <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2023-12-13 14:50:54 +00:00
parent e955501f61
commit 8184522c6d
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 5 additions and 1 deletions

View File

@ -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)