From fab07ca3ef277e64ccb646700f4da2f7dd3a14ce Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 20 Jun 2019 13:23:19 +0200 Subject: Add support for vcpkg default target triplets As per vcpkg documentation, this is a tweak that allows respecting the vcpkg default target triplet environment variable, which simplifies the command line slightly. In order to make this also work for modules other than qtbase, we're going to need to consider the creation of a toolchain file. Change-Id: I2573f6644d671c710fd823df83e2205dbbfe19e6 Reviewed-by: Alexandru Croitor Reviewed-by: Qt CMake Build Bot --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 3deeaeb7ad..d47bc91cbf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,9 @@ cmake_minimum_required(VERSION 3.15.0) +if(DEFINED ENV{VCPKG_DEFAULT_TRIPLET} AND NOT DEFINED VCPKG_TARGET_TRIPLET) + set(VCPKG_TARGET_TRIPLET "$ENV{VCPKG_DEFAULT_TRIPLET}" CACHE STRING "") +endif() + project(QtBase VERSION 6.0.0 DESCRIPTION "Qt Base Libraries" -- cgit v1.2.3