summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2019-06-20 13:23:19 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-06-20 11:55:01 +0000
commitfab07ca3ef277e64ccb646700f4da2f7dd3a14ce (patch)
treef5c4c3a11beb153a1ddf9cb746f914152faf5ae4 /CMakeLists.txt
parentaeaef4d6f316870313ed8fa88e25d3f035c337e0 (diff)
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 <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
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"