From ed53077203c1169dc35651136b2136e2ad87b98e Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 16 Oct 2016 12:03:19 +0300 Subject: [PATCH] Fixed Mac OS X deployment target. --- src/app/tape/tape.pro | 13 ++++++++++++- src/app/valentina/valentina.pro | 13 ++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/app/tape/tape.pro b/src/app/tape/tape.pro index 8c0a05b56..02df17f28 100644 --- a/src/app/tape/tape.pro +++ b/src/app/tape/tape.pro @@ -200,7 +200,18 @@ unix{ # Some macx stuff QMAKE_MAC_SDK = macosx - QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 + # Check which minimal OSX version supports current Qt version + # See page https://doc.qt.io/qt-5/supported-platforms-and-configurations.html + equals(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 6) { + QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.8 + } else { + equals(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 3) { + QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 + } else { + QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6 + } + } + # Path to resources in app bundle #RESOURCES_DIR = "Contents/Resources" defined in translation.pri FRAMEWORKS_DIR = "Contents/Frameworks" diff --git a/src/app/valentina/valentina.pro b/src/app/valentina/valentina.pro index 918ce76db..e187cebfe 100644 --- a/src/app/valentina/valentina.pro +++ b/src/app/valentina/valentina.pro @@ -252,7 +252,18 @@ unix{ # Some macx stuff QMAKE_MAC_SDK = macosx - QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 + # Check which minimal OSX version supports current Qt version + # See page https://doc.qt.io/qt-5/supported-platforms-and-configurations.html + equals(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 6) { + QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.8 + } else { + equals(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 3) { + QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 + } else { + QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6 + } + } + # Path to resources in app bundle #RESOURCES_DIR = "Contents/Resources" defined in translation.pri FRAMEWORKS_DIR = "Contents/Frameworks"