From eaf64a222fcdcf54e2593914f5a60be3b6a18931 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 9 Oct 2020 11:50:41 +0200 Subject: [PATCH] CMake: Run auto-detection routines before any project command This is needed to ensure that the auto-detection runs before any toolchain file is loaded, like in a stand-alone qtbase build. This fixes the issue that we had to specify ANDROID_STL=c++_shared in a top-level build, even though it's properly defaulted in QtAutoDetect.cmake. Task-number: QTBUG-87309 Change-Id: I8ced2213ca2e5a877bfd210e59da4ef4d6c8ac74 Reviewed-by: Cristian Adam Reviewed-by: Alexandru Croitor --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 13817e75..18eba9de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,7 @@ cmake_minimum_required(VERSION 3.15.0) +include(${CMAKE_CURRENT_SOURCE_DIR}/qtbase/cmake/QtAutoDetect.cmake) + project(Qt VERSION 6.0.0 DESCRIPTION "Qt Libraries"