summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2017-11-30 22:18:25 +0200
committerGitHub <noreply@github.com>2017-11-30 22:18:25 +0200
commitcabbb30ab457e30084c8e125fe394c1801048b67 (patch)
tree8d8c55d110b72fe1b64fb493219b12f6af16621d
parent1db319737dd472901be7880510fb7de8c5bd9dc2 (diff)
parent203c5ce9906238ec2d793fb321a7c5b113b43600 (diff)
downloadmeson-cabbb30ab457e30084c8e125fe394c1801048b67.tar.gz
Merge pull request #2668 from dcbaker/wip/macos-10.13-fixes
macos 10.13 fixes
-rw-r--r--mesonbuild/dependencies/misc.py6
-rw-r--r--test cases/osx/3 has function xcode8/meson.build8
2 files changed, 10 insertions, 4 deletions
diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py
index e9665976f..41666a357 100644
--- a/mesonbuild/dependencies/misc.py
+++ b/mesonbuild/dependencies/misc.py
@@ -625,8 +625,10 @@ class Python3Dependency(ExternalDependency):
elif mesonlib.is_osx() and DependencyMethods.EXTRAFRAMEWORK in self.methods:
# In OSX the Python 3 framework does not have a version
# number in its name.
- fw = ExtraFrameworkDependency('python', False, None, self.env,
- self.language, kwargs)
+ # There is a python in /System/Library/Frameworks, but that's
+ # python 2, Python 3 will always bin in /Library
+ fw = ExtraFrameworkDependency(
+ 'python', False, '/Library/Frameworks', self.env, self.language, kwargs)
if fw.found():
self.compile_args = fw.get_compile_args()
self.link_args = fw.get_link_args()
diff --git a/test cases/osx/3 has function xcode8/meson.build b/test cases/osx/3 has function xcode8/meson.build
index 5fe3e5378..0df736529 100644
--- a/test cases/osx/3 has function xcode8/meson.build
+++ b/test cases/osx/3 has function xcode8/meson.build
@@ -7,8 +7,12 @@ sdk_args = ['-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/M
args_10_11 = ['-mmacosx-version-min=10.11'] + sdk_args
args_10_12 = ['-mmacosx-version-min=10.12'] + sdk_args
+# XCode 9 location for the macOS 10.13 SDK
+sdk_args = ['-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk']
+args_10_12 = ['-mmacosx-version-min=10.13'] + sdk_args
+
# Test requires XCode 8 which has the MacOSX 10.12 SDK
-if cc.version().version_compare('>=8.0')
+if cc.version().version_compare('>=8.0') and cc.version().version_compare('<9.0')
if cc.has_function('clock_gettime', args : args_10_11, prefix : '#include <time.h>')
error('Should not have found clock_gettime via <time.h> when targeting Mac OS X 10.11')
endif
@@ -22,5 +26,5 @@ if cc.version().version_compare('>=8.0')
error('Did NOT find clock_gettime w/o a prototype when targeting Mac OS X 10.12')
endif
else
- message('Test needs XCode 8, skipping...')
+ error('MESON_SKIP_TEST Test needs XCode 8.')
endif