From 84529d7b395681d40b7737103457435a4c6ad046 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 20 Feb 2023 15:50:23 +0200 Subject: [PATCH] Better control over macos deployment target version. --- .cirrus.yml | 3 ++- qbs/modules/buildconfig/buildconfig.qbs | 3 +++ valentina.qbs | 6 ++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 2c8c0055f..adc2f3187 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -180,7 +180,7 @@ macos_task_template: &MACOS_TASK_TEMPLATE - qbs setup-qt /opt/homebrew/opt/qt6/bin/qmake qt6 - qbs-config defaultProfile qt6 - qbs config profiles.qt6.baseProfile clang - - qbs build -f valentina.qbs -d $CIRRUS_WORKING_DIR/build --command-echo-mode command-line config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:$CIRRUS_WORKING_DIR/build/install-root profile:qt6 project.enableConan:true + - qbs build -f valentina.qbs -d $CIRRUS_WORKING_DIR/build --command-echo-mode command-line config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:$CIRRUS_WORKING_DIR/build/install-root profile:qt6 project.enableConan:true project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} - ccache -s deploy_script: - pwd @@ -197,6 +197,7 @@ macos_task: QT_BRANCH: Qt6 ARCHITECTURE: arm64 PLATFORM: "macOS_11+" + MACOS_DEPLOYMENT_TARGET: "11.0" matrix: - name: 'macOS Monterey 12 [signle bundle, no tests]' env: diff --git a/qbs/modules/buildconfig/buildconfig.qbs b/qbs/modules/buildconfig/buildconfig.qbs index 4ba91a1cd..a3cad02f0 100644 --- a/qbs/modules/buildconfig/buildconfig.qbs +++ b/qbs/modules/buildconfig/buildconfig.qbs @@ -149,6 +149,9 @@ Module { } readonly property string minimumMacosVersion: { + if (project.minimumMacosVersion !== undefined) + return project.minimumMacosVersion; + // Check which minimal OSX version supports current Qt version if (Qt.core.versionMajor >= 6) { // For Qt 6.5 https://doc-snapshots.qt.io/qt6-6.5/supported-platforms.html diff --git a/valentina.qbs b/valentina.qbs index 7ac80c7f3..cc021d7f4 100644 --- a/valentina.qbs +++ b/valentina.qbs @@ -5,11 +5,17 @@ Project { minimumQbsVersion: "1.16" property bool enableConan: false + property string minimumMacosVersion: undefined Probes.ConanfileProbe { id: thirdPartyConanPackages condition: enableConan conanfilePath: project.sourceDirectory + "/conanfile.txt" + settings: { + if (qbs.targetOS.contains("macos") && project.minimumMacosVersion !== undefined) + return ({"os.version": project.minimumMacosVersion}); + return undefined; + } } references: [