Better control over macos deployment target version.

This commit is contained in:
Roman Telezhynskyi 2023-02-20 15:50:23 +02:00
parent ac84b9f273
commit 84529d7b39
3 changed files with 11 additions and 1 deletions

View File

@ -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:

View File

@ -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

View File

@ -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: [