aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/buildsystems/vcpkg.cmake9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake
index 88acc8436..649e5967a 100644
--- a/scripts/buildsystems/vcpkg.cmake
+++ b/scripts/buildsystems/vcpkg.cmake
@@ -11,7 +11,14 @@ if(NOT VCPKG_TOOLCHAIN)
elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 ARM$")
set(_VCPKG_TARGET_TRIPLET_ARCH arm)
else()
- set(_VCPKG_TARGET_TRIPLET_ARCH x86)
+ find_program(_VCPKG_CL cl)
+ if(_VCPKG_CL MATCHES "amd64/cl.exe$")
+ set(_VCPKG_TARGET_TRIPLET_ARCH x64)
+ elseif(_VCPKG_CL MATCHES "arm/cl.exe$")
+ set(_VCPKG_TARGET_TRIPLET_ARCH arm)
+ else()
+ set(_VCPKG_TARGET_TRIPLET_ARCH x86)
+ endif()
endif()
endif()