From 2cf0ba1fba9293b3265a186527dbc90d395dfd20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Fri, 5 Jul 2019 10:47:26 +0200 Subject: Use pre-compiled headers when building Qt with cmake Some modules define their own manually-maintained lists, and we can rely on the headers generated by each module to include in the pch as well e.g. QtCore/QtCore. There's also e.g. QtWidgetDepends for QtWidgets, but this only works for modules, not for tools, examples or other applications. For now we'll use the Qt/Qt headers for the modules we depend on. Building with PCH can be disabled with -DBUILD_WITH_PCH=NO, and it only works for versions of CMake newer than 3.15.20190829. Change-Id: Iae52bd69acfdfd58f4cd20d3cfa3c7f42775f732 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor --- src/platformsupport/vkconvenience/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/platformsupport/vkconvenience/CMakeLists.txt') diff --git a/src/platformsupport/vkconvenience/CMakeLists.txt b/src/platformsupport/vkconvenience/CMakeLists.txt index 325da3f8f8..feee14dafc 100644 --- a/src/platformsupport/vkconvenience/CMakeLists.txt +++ b/src/platformsupport/vkconvenience/CMakeLists.txt @@ -20,10 +20,11 @@ add_qt_module(VulkanSupport PUBLIC_LIBRARIES Qt::Core Qt::Gui + PRECOMPILED_HEADER + "../../corelib/global/qt_pch.h" ) #### Keys ignored in scope 1:.:.:vkconvenience.pro:: # CONFIG = "static" "internal_module" # MODULE = "vulkan_support" -# PRECOMPILED_HEADER = "../../corelib/global/qt_pch.h" # _LOADED = "qt_module" -- cgit v1.2.3