From dfb8c387b69768c6ee900a0ded23fa3ca0c2b88b Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 23 Jul 2016 12:54:00 +0300 Subject: [PATCH] Added checking which minimal OSX version supports current Qt version. From time to time Qt change minimal supported OS X version. This checking will help build Valentina on older Qt version without fixing .pro files. --HG-- branch : develop --- src/app/tape/tape.pro | 12 +++++++++++- src/app/valentina/valentina.pro | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/app/tape/tape.pro b/src/app/tape/tape.pro index cbe7f04af..8acecf751 100644 --- a/src/app/tape/tape.pro +++ b/src/app/tape/tape.pro @@ -200,7 +200,17 @@ unix{ # Some macx stuff QMAKE_MAC_SDK = macosx - QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 + # Check which minimal OSX version supports current Qt version + 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 7c2a33e5c..79d7dc143 100644 --- a/src/app/valentina/valentina.pro +++ b/src/app/valentina/valentina.pro @@ -214,7 +214,17 @@ unix{ # Some macx stuff QMAKE_MAC_SDK = macosx - QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 + # Check which minimal OSX version supports current Qt version + 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"