diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2018-02-26 15:51:53 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2018-03-02 20:34:37 +0000 |
commit | 0c51c4dd78c564eaf722a2735ef1f8236ce00a86 (patch) | |
tree | a12dbeb211f965226ad5b1c19019bc31f115642c /qtinfo.py | |
parent | b83eb9e389b0b9501c18dcc123d1957bd7246815 (diff) |
Improve macOS minimum deployment target decision process
Instead of asking the user to specify a minimum macOS deployment
target, setup.py will now query the value from qmake. A user can
still specify a custom value if they wish to do so.
This simplifies building on the CI, meaning there is no need to
hardcode the minimum deployment targets per branch.
Task-number: PYSIDE-603
Task-number: PYSIDE-606
Change-Id: I55c79dc643b5a2b59d0e65add132c581fb6fc7f4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'qtinfo.py')
-rw-r--r-- | qtinfo.py | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -56,6 +56,10 @@ class QtInfo(object): def getQmlPath(self): return self.getProperty("QT_INSTALL_QML") + def getMacOSMinDeploymentTarget(self): + """ Return value is a macOS version or None. """ + return self.getProperty("QMAKE_MACOSX_DEPLOYMENT_TARGET") + def getBuildType(self): """ Return value is either debug, release, debug_release, or None. """ return self.getProperty("BUILD_TYPE") @@ -134,6 +138,11 @@ class QtInfo(object): # Get mkspecs variables and cache them. self._getQMakeMkspecsVariables() + # Get macOS minimum deployment target. + key = 'QMAKE_MACOSX_DEPLOYMENT_TARGET' + if key in self._mkspecs_dict: + self._query_dict[key] = self._mkspecs_dict[key] + # Figure out how Qt was built: debug mode, release mode, or both. build_type = self._parseQtBuildType() if build_type: @@ -181,5 +190,6 @@ class QtInfo(object): headers_dir = property(getHeadersPath) docs_dir = property(getDocsPath) qml_dir = property(getQmlPath) + macos_min_deployment_target = property(getMacOSMinDeploymentTarget) build_type = property(getBuildType) src_dir = property(getSrcDir) |