From 021f0108cb76f0b41d74da6e6f1a965aa4678bb8 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 19 Jun 2023 10:11:20 +0200 Subject: [PATCH] qbs build: Do not declare a Qt dependency for the Ctrl-C stub tool Change-Id: I75f4a1775b7718ee8d38937557be3bf71efade1f Reviewed-by: Christian Stenger --- qbs/imports/QtcProduct.qbs | 11 ++++++++--- src/libs/utils/process_ctrlc_stub.qbs | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/qbs/imports/QtcProduct.qbs b/qbs/imports/QtcProduct.qbs index 9c2eb6be880..e5f341704df 100644 --- a/qbs/imports/QtcProduct.qbs +++ b/qbs/imports/QtcProduct.qbs @@ -13,6 +13,7 @@ Product { property string fileName: FileInfo.fileName(sourceDirectory) + ".qbs" property bool useNonGuiPchFile: false property bool useGuiPchFile: false + property bool useQt: true property string pathToSharedSources: FileInfo.joinPaths(path, FileInfo.relativePath(FileInfo.joinPaths('/', qtc.ide_qbs_imports_path), FileInfo.joinPaths('/', qtc.ide_shared_sources_path))) @@ -28,8 +29,12 @@ Product { enableFallback: false } } - Depends { name: "Qt.core"; versionAtLeast: "6.2.0" } - Depends { name: "Qt.core5compat" } + Depends { + name: "Qt" + condition: useQt + submodules: ["core", "core5compat"] + versionAtLeast: "6.2.0" + } // TODO: Should fall back to what came from Qt.core for Qt < 5.7, but we cannot express that // atm. Conditionally pulling in a module that sets the property is also not possible, @@ -75,7 +80,7 @@ Product { cpp.cxxLanguageVersion: "c++17" cpp.defines: qtc.generalDefines cpp.minimumWindowsVersion: "6.1" - cpp.useCxxPrecompiledHeader: useNonGuiPchFile || useGuiPchFile + cpp.useCxxPrecompiledHeader: useQt && (useNonGuiPchFile || useGuiPchFile) cpp.visibility: "minimal" Group { diff --git a/src/libs/utils/process_ctrlc_stub.qbs b/src/libs/utils/process_ctrlc_stub.qbs index c92215df8e3..13359b7c9d7 100644 --- a/src/libs/utils/process_ctrlc_stub.qbs +++ b/src/libs/utils/process_ctrlc_stub.qbs @@ -4,7 +4,7 @@ QtcTool { name: "qtcreator_ctrlc_stub" consoleApplication: true condition: qbs.targetOS.contains("windows") - + useQt: false files: [ "process_ctrlc_stub.cpp" ]